Or if you want to embed the whole application data into one object (for example to avoid global variables). You can then override QCoreApplication::instance() to return your "extended" pointer. And your main() can look like this then:
#include "myapplication.h"
int main(int argc, char **argv){
MyApplication app(argc, argv);
return app.exec();
}
#include "myapplication.h"
int main(int argc, char **argv){
MyApplication app(argc, argv);
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks