aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAssam Boudjelthia <assam.boudjelthia@qt.io>2020-02-12 17:33:06 +0200
committerAssam Boudjelthia <assam.boudjelthia@qt.io>2020-02-24 12:12:34 +0200
commita962681a11a4a4a36053d060702353965298b8bb (patch)
tree209f7e2be0752bed7074eb3d6e6242f645140ca7
parent40cb674800e0ba90876e982160c3c5bcd2f0e929 (diff)
Examples: enable HighDPI scaling for Android
These examples show very tiny UI elements on Android devices, thus enabling HighDPI. Task-number: QTBUG-80717 Change-Id: Id3b4184bef74faf9f7d165ac211bd39375d67f62 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--examples/quick/models/objectlistmodel/main.cpp1
-rw-r--r--examples/quick/scenegraph/customgeometry/main.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/examples/quick/models/objectlistmodel/main.cpp b/examples/quick/models/objectlistmodel/main.cpp
index 8fbe7c183c..1418af90ca 100644
--- a/examples/quick/models/objectlistmodel/main.cpp
+++ b/examples/quick/models/objectlistmodel/main.cpp
@@ -66,6 +66,7 @@
//![0]
int main(int argc, char ** argv)
{
+ QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
QList<QObject *> dataList = {
diff --git a/examples/quick/scenegraph/customgeometry/main.cpp b/examples/quick/scenegraph/customgeometry/main.cpp
index 15310d279f..0b9b2eb3f9 100644
--- a/examples/quick/scenegraph/customgeometry/main.cpp
+++ b/examples/quick/scenegraph/customgeometry/main.cpp
@@ -56,6 +56,7 @@
//! [1]
int main(int argc, char **argv)
{
+ QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
QQuickView view;