fixes to qt_demo.cpp