
Originally Posted by
natron
Since this is no longer a QMainWindow subclass, the setCentralWidget is no longer available.
Maybe you should create an instance of QMainWindow and then use setCentralWidget to set your widget as its main part? I mean something like:
int main(int argc, char **argv){
// ...
mw.setCentralWidget(createYourWidgetHere);
//...
mw.show();
return app.exec();
}
int main(int argc, char **argv){
QApplication app(argc, argv);
// ...
QMainWindow mw;
mw.setCentralWidget(createYourWidgetHere);
//...
mw.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
As a side, how do you experts start your Qt applications?
I don't exactly understand what you mean... How do we execute applications or how do we implement them?
If the former then either from the command line, KDevelop or by clicking on an icon in Konqueror. I think all people do it in one of these ways...
If the latter, then I start by writing main.cpp with contents such as the one above, then implement my main ui, subclass it to create the main window class and then I check if it works fine. Afterwards I begin to implement the functionality.
And I don't use dynamically loaded forms
Bookmarks