QApplication::setMainWidget is deprecated in Qt 4. It is part of the Qt3 support API.
So, if you wish to use it you will have to compile Qt with Qt 3 support enabled, although you don't have any reason to do that, unless you're porting to some application for Qt 3 to Qt 4.
Here's how it is defined:
#ifdef QT3_SUPPORT
static QT3_SUPPORT
QWidget *mainWidget
();
static QT3_SUPPORT
void setMainWidget
(QWidget *);
#endif
#ifdef QT3_SUPPORT
static QT3_SUPPORT QWidget *mainWidget();
static QT3_SUPPORT void setMainWidget(QWidget *);
#endif
To copy to clipboard, switch view to plain text mode
So, in Qt 4, just show the main widget. It will be enough.
Also, QVBox has been replaced in Qt4 by QVBoxLayout.
Note that all deprecated functions are documented, so if you open Assistant and you type in the function name, it will tell you whether it is obsolete or not.
Regards
Bookmarks