summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAssam Boudjelthia <assam.boudjelthia@qt.io>2020-02-24 09:50:51 +0200
committerAssam Boudjelthia <assam.boudjelthia@qt.io>2020-03-03 12:39:56 +0200
commit873eba3f8bdd1151762fae2dfcee733ebdd7c0be (patch)
treed194805258ef9f1d8ac8dba35ff3f71fee9ed291 /examples
parent275401f580abe19c1519e3d05acec20c68fd9fa6 (diff)
Examples: use QDialog::showMaximaized() for Android
Examples that use QDialog as main window should be maximized on Android to avoid a black view on most of the screen. Task-number: QTBUG-80717 Change-Id: I933c1a01d95d53da009c190c37fa32f27be5af5e Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/network/http/main.cpp6
-rw-r--r--examples/widgets/layouts/basiclayouts/main.cpp4
-rw-r--r--examples/widgets/layouts/dynamiclayouts/main.cpp5
3 files changed, 14 insertions, 1 deletions
diff --git a/examples/network/http/main.cpp b/examples/network/http/main.cpp
index 1339f2f693..6c86933fd6 100644
--- a/examples/network/http/main.cpp
+++ b/examples/network/http/main.cpp
@@ -81,7 +81,11 @@ int main(int argc, char *argv[])
const QRect availableSize = httpWin.screen()->availableGeometry();
httpWin.resize(availableSize.width() / 5, availableSize.height() / 5);
httpWin.move((availableSize.width() - httpWin.width()) / 2, (availableSize.height() - httpWin.height()) / 2);
-
+#ifdef Q_OS_ANDROID
+ httpWin.showMaximized();
+#else
httpWin.show();
+#endif
+
return app.exec();
}
diff --git a/examples/widgets/layouts/basiclayouts/main.cpp b/examples/widgets/layouts/basiclayouts/main.cpp
index f59de1d385..cf0ff0a535 100644
--- a/examples/widgets/layouts/basiclayouts/main.cpp
+++ b/examples/widgets/layouts/basiclayouts/main.cpp
@@ -56,7 +56,11 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Dialog dialog;
+#ifdef Q_OS_ANDROID
+ dialog.showMaximized();
+#else
dialog.show();
+#endif
return app.exec();
}
diff --git a/examples/widgets/layouts/dynamiclayouts/main.cpp b/examples/widgets/layouts/dynamiclayouts/main.cpp
index 9959c472f4..cf0ff0a535 100644
--- a/examples/widgets/layouts/dynamiclayouts/main.cpp
+++ b/examples/widgets/layouts/dynamiclayouts/main.cpp
@@ -56,6 +56,11 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Dialog dialog;
+#ifdef Q_OS_ANDROID
+ dialog.showMaximized();
+#else
dialog.show();
+#endif
+
return app.exec();
}