indeed,
@
#include <QtGui/QGuiApplication>
int main(int argc, char *argv[])
{
QScopedPointer<QGuiApplication> app(createApplication(argc, argv));
...
return app.exec();
}
@
This would do the trick!
But: ... I rater like to use it this way:
@
#include <QtGui/QGuiApplication>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
...
return app.exec();
}
@
As creating your app on the heap doesn't make much sense...
when the app exits, app goes out of scope and gets deleted anyway, and stack mem is faster..
unless there is a special reason to do it your way..!
Both examples are valid.