diff options
Diffstat (limited to 'xmake/templates/c++/qt/quickapp_static/src/main.cpp')
| -rw-r--r-- | xmake/templates/c++/qt/quickapp_static/src/main.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/xmake/templates/c++/qt/quickapp_static/src/main.cpp b/xmake/templates/c++/qt/quickapp_static/src/main.cpp new file mode 100644 index 000000000..7d9cb80df --- /dev/null +++ b/xmake/templates/c++/qt/quickapp_static/src/main.cpp @@ -0,0 +1,17 @@ +#include <QGuiApplication> +#include <QQmlApplicationEngine> + +int main(int argc, char *argv[]) { +#if QT_VERSION >= 0x50601 + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +#endif + + QGuiApplication app(argc, argv); + + QQmlApplicationEngine engine; + engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); + if (engine.rootObjects().isEmpty()) + return -1; + + return app.exec(); +} |
