Changeset View
Changeset View
Standalone View
Standalone View
examples/android/main.cpp
1 | 1 | | |||
---|---|---|---|---|---|
2 | 2 | | |||
3 | #include <QGuiApplication> | 3 | #include <QGuiApplication> | ||
4 | #include <QQmlApplicationEngine> | 4 | #include <QQmlApplicationEngine> | ||
5 | #include <QtQml> | 5 | #include <QtQml> | ||
6 | #include <QUrl> | 6 | #include <QUrl> | ||
7 | 7 | | |||
8 | Q_DECL_EXPORT int main(int argc, char *argv[]) | 8 | Q_DECL_EXPORT int main(int argc, char *argv[]) | ||
9 | { | 9 | { | ||
10 | QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); | ||||
10 | QGuiApplication app(argc, argv); | 11 | QGuiApplication app(argc, argv); | ||
11 | 12 | | |||
12 | qputenv("QML_IMPORT_TRACE", "1"); | 13 | qputenv("QML_IMPORT_TRACE", "1"); | ||
14 | //FIXME | ||||
15 | qputenv("QT_QUICK_CONTROLS_STYLE", "Material"); | ||||
13 | QQmlApplicationEngine engine; | 16 | QQmlApplicationEngine engine; | ||
14 | 17 | | |||
15 | engine.load(QUrl(QStringLiteral("qrc:///contents/ui/ExampleApp.qml"))); | 18 | engine.load(QUrl(QStringLiteral("qrc:///contents/ui/ExampleApp.qml"))); | ||
16 | if (engine.rootObjects().isEmpty()) { | 19 | if (engine.rootObjects().isEmpty()) { | ||
17 | return -1; | 20 | return -1; | ||
18 | } | 21 | } | ||
19 | 22 | | |||
20 | return app.exec(); | 23 | return app.exec(); | ||
21 | } | 24 | } |