PDA

View Full Version : Qt3.3 QApplication mainWidget equivalent in Qt4.2



arunvv
18th August 2008, 21:53
Hi All,

I have an application which was developed under Qt3.3 version. I need to add few more additions to it and need to use Qt4.2version. So in Qt3.3 app it has postevent for an application saying "QApplication::postEvent(qApp->mainWidget(), new function()"

So it doesn't compile in Qt4.2 as there is no mainWindget as a member. What is the equivalent for mainWidget in Qt-4.2

wysota
18th August 2008, 22:22
There is no equivalent as there is no concept of main widget in Qt4. You can use QApplication::topLevelWidgets() though...