forked from qt-creator/qt-creator
Qt Quick Application wizards: No AA_EnableHighDpiScaling on Simulator
Avoid setting Qt::AA_EnableHighDpiScaling when running in the simulator.
Simulator detection is done by testing whether environment variable
QTGLESSTREAM_DISPLAY is set.
This amends 8c3bd61594
where all platforms
except Windows were excluded from setting the flag.
Task-number: QTBUG-64815
Change-Id: I8ab7ba9f24217915dc1d01e1f2eb5c37923c5504
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
This commit is contained in:
@@ -2,18 +2,20 @@
|
||||
%{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
|
||||
#if defined(Q_OS_WIN)
|
||||
@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);
|
||||
#endif
|
||||
}
|
||||
@else
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
@endif
|
||||
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
|
Reference in New Issue
Block a user