summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/projects/qt/quickapp/src/main.cpp2
-rw-r--r--tests/projects/qt/quickapp_static/src/main.cpp2
-rw-r--r--xmake/templates/c++/qt.quickapp/project/src/main.cpp2
-rw-r--r--xmake/templates/c++/qt.quickapp_static/project/src/main.cpp2
4 files changed, 8 insertions, 0 deletions
diff --git a/tests/projects/qt/quickapp/src/main.cpp b/tests/projects/qt/quickapp/src/main.cpp
index 6333b85c4..2ec4b880c 100644
--- a/tests/projects/qt/quickapp/src/main.cpp
+++ b/tests/projects/qt/quickapp/src/main.cpp
@@ -3,7 +3,9 @@
int main(int argc, char *argv[])
{
+#if QT_VERSION >= 0x50601
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+#endif
QGuiApplication app(argc, argv);
diff --git a/tests/projects/qt/quickapp_static/src/main.cpp b/tests/projects/qt/quickapp_static/src/main.cpp
index 6333b85c4..2ec4b880c 100644
--- a/tests/projects/qt/quickapp_static/src/main.cpp
+++ b/tests/projects/qt/quickapp_static/src/main.cpp
@@ -3,7 +3,9 @@
int main(int argc, char *argv[])
{
+#if QT_VERSION >= 0x50601
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+#endif
QGuiApplication app(argc, argv);
diff --git a/xmake/templates/c++/qt.quickapp/project/src/main.cpp b/xmake/templates/c++/qt.quickapp/project/src/main.cpp
index 6333b85c4..2ec4b880c 100644
--- a/xmake/templates/c++/qt.quickapp/project/src/main.cpp
+++ b/xmake/templates/c++/qt.quickapp/project/src/main.cpp
@@ -3,7 +3,9 @@
int main(int argc, char *argv[])
{
+#if QT_VERSION >= 0x50601
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+#endif
QGuiApplication app(argc, argv);
diff --git a/xmake/templates/c++/qt.quickapp_static/project/src/main.cpp b/xmake/templates/c++/qt.quickapp_static/project/src/main.cpp
index 6333b85c4..2ec4b880c 100644
--- a/xmake/templates/c++/qt.quickapp_static/project/src/main.cpp
+++ b/xmake/templates/c++/qt.quickapp_static/project/src/main.cpp
@@ -3,7 +3,9 @@
int main(int argc, char *argv[])
{
+#if QT_VERSION >= 0x50601
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+#endif
QGuiApplication app(argc, argv);