Commit 1903bfab authored by Alex Blasche's avatar Alex Blasche
Browse files

Fix places_map example view on Android


The previous setup enforced a small 360x640 view size on Android which
makes no sense on the platform's full screen premise.

This patch tells the QML rectangle to adjust to the parent's size and
shifts the size limitation to the surrounding QuickView. At the same
time the QuickView will automatically change to full screen as per
platform requirement.

Change-Id: I2dcd0fc345f6c1ef7520bb10116d9f2fe0722dff
Reviewed-by: default avatarPaolo Angelelli <paolo.angelelli@qt.io>
parent 18b22e3b
No related merge requests found
Showing with 3 additions and 2 deletions
...@@ -46,6 +46,8 @@ int main(int argc, char **argv) ...@@ -46,6 +46,8 @@ int main(int argc, char **argv)
QGuiApplication app(argc,argv); QGuiApplication app(argc,argv);
QQuickView view; QQuickView view;
view.setSource(QUrl(QStringLiteral("qrc:///places_map.qml"))); view.setSource(QUrl(QStringLiteral("qrc:///places_map.qml")));
view.setWidth(360);
view.setHeight(640);
view.show(); view.show();
return app.exec(); return app.exec();
} }
...@@ -45,8 +45,7 @@ import QtLocation 5.6 ...@@ -45,8 +45,7 @@ import QtLocation 5.6
//! [Imports] //! [Imports]
Rectangle { Rectangle {
width: 360 anchors.fill: parent
height: 640
//! [Initialize Plugin] //! [Initialize Plugin]
Plugin { Plugin {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment