Quote Originally Posted by Djony View Post
I have tried this, but I am using Qt 4.1.4, and my compiler gives me error:
class QApplication' has no member named 'setMainWidget'
from http://doc.trolltech.com/4.2/porting4.html#qapplication
QApplication::setMainWidget() is no longer used. When all an application's windows are closed, the application will exit normally.
The guy, posting the above code probably is using Qt-3.* whereas you are using Qt-4.*.