Qt5 compatibility introduced

Initial attempt to introduce Qt5.3 compatibility.