diff options
author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2020-02-12 17:33:06 +0200 |
---|---|---|
committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2020-02-24 12:12:34 +0200 |
commit | a962681a11a4a4a36053d060702353965298b8bb (patch) | |
tree | 209f7e2be0752bed7074eb3d6e6242f645140ca7 /examples/quick | |
parent | 40cb674800e0ba90876e982160c3c5bcd2f0e929 (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>
Diffstat (limited to 'examples/quick')
-rw-r--r-- | examples/quick/models/objectlistmodel/main.cpp | 1 | ||||
-rw-r--r-- | examples/quick/scenegraph/customgeometry/main.cpp | 1 |
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; |