Made changes so examples compile using Qt 5.2.1

It seems that some of the function signatures have changed between Qt
4 and Qt 5.