From 013f2a9d7300c73a785d67313bcffd336e483e8f Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 27 Nov 2020 12:09:47 +0100 Subject: [PATCH] Wizards: Prevent deprecation warning in generated QtQuick application Fixes: QTCREATORBUG-25002 Change-Id: Ic118e98a48913acc2abc841b985685059ef3741a Reviewed-by: Eike Ziller --- .../templates/wizards/projects/qtquickapplication/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/qtcreator/templates/wizards/projects/qtquickapplication/main.cpp b/share/qtcreator/templates/wizards/projects/qtquickapplication/main.cpp index 70ae0ef96ce..466c23fe69a 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickapplication/main.cpp +++ b/share/qtcreator/templates/wizards/projects/qtquickapplication/main.cpp @@ -11,10 +11,14 @@ int main(int argc, char *argv[]) qputenv("QT_QPA_EGLFS_PHYSICAL_WIDTH", QByteArray("213")); qputenv("QT_QPA_EGLFS_PHYSICAL_HEIGHT", QByteArray("120")); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +#endif } @else +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +#endif @endif QGuiApplication app(argc, argv);