forked from qt-creator/qt-creator
This reverts commit dcb8681cb7.
The effort to handle asynchronous loading is not required for the
qmllivepreview (for which it had been introduced).
Task-number: QTCREATORBUG-19648
Change-Id: I20cbd318dedb3da43d4993c0c0a1910ffe6d5761
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
29 lines
837 B
C++
29 lines
837 B
C++
%{Cpp:LicenseTemplate}\
|
|
%{JS: QtSupport.qtIncludes([], ["QtGui/QGuiApplication", "QtQml/QQmlApplicationEngine"])}
|
|
int main(int argc, char *argv[])
|
|
{
|
|
@if %{UseVirtualKeyboard}
|
|
qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
|
|
|
|
@endif
|
|
@if %{SetQPAPhysicalSize}
|
|
if (qEnvironmentVariableIsEmpty("QTGLESSTREAM_DISPLAY")) {
|
|
qputenv("QT_QPA_EGLFS_PHYSICAL_WIDTH", QByteArray("213"));
|
|
qputenv("QT_QPA_EGLFS_PHYSICAL_HEIGHT", QByteArray("120"));
|
|
|
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
|
}
|
|
@else
|
|
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();
|
|
}
|