mirror of
https://github.com/QuasarApp/QtAndroidTools.git
synced 2025-04-28 14:04:32 +00:00
22 lines
592 B
C++
22 lines
592 B
C++
#include <QGuiApplication>
|
|
#include <QQmlApplicationEngine>
|
|
#include <QQuickStyle>
|
|
#include <QIcon>
|
|
#include "../QtAndroidTools/QtAndroidTools.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
|
QQuickStyle::setStyle("Material");
|
|
QIcon::setThemeName("tools");
|
|
QGuiApplication app(argc, argv);
|
|
QQmlApplicationEngine engine;
|
|
#ifdef Q_OS_ANDROID
|
|
QtAndroidTools::InitializeQmlTools();
|
|
#endif
|
|
engine.load(QUrl(QStringLiteral("qrc:/Main.qml")));
|
|
if(engine.rootObjects().isEmpty()) return -1;
|
|
|
|
return app.exec();
|
|
}
|