[qt] add some qt 4.7 compatibility.