Files
qt-creator/share/qtcreator/templates/wizards/projects/qtquickapplication/main.cpp
Alessandro Portale dbf9bd444b Wizards: Refresh the basic Qt Quick Application wizard
It now really creates an empty project.
Also, adapt the QtQuickPrototype template accordingly.

Change-Id: I0749805211df080c88cad1b9c2d476d56836c18a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-08-02 17:00:52 +00:00

25 lines
685 B
C++

%{Cpp:LicenseTemplate}\
%{JS: QtSupport.qtIncludes([], ["QtGui/QGuiApplication", "QtQml/QQmlApplicationEngine"])}
int main(int argc, char *argv[])
{
@if %{SetQPAPhysicalSize}
qputenv("QT_QPA_EGLFS_PHYSICAL_WIDTH", QByteArray("213"));
qputenv("QT_QPA_EGLFS_PHYSICAL_HEIGHT", QByteArray("120"));
@endif
@if %{UseVirtualKeyboard}
qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
@endif
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
if (engine.rootObjects().isEmpty())
return -1;
return app.exec();
}