[SOLVED] Missing File or Directory?
-
Hi,
There are 3 application types in Qt5
QCoreApplication -> Command-Line App -> (needs module “core”)
QGuiApplication -> Quick App -> (needs module “gui”)
QApplication -> Widget App -> (needs module “widget”)You are using quick, so you may change QApplication to
@
#include <QtGui/QGuiApplication>int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);... return app.exec();
}
@ -
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.