Fix the Qt sample, broken after #1722.
Merge pull request #1833 from SpecLad:fix-qt-sample