diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2017-08-31 09:45:14 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2017-08-31 11:04:48 +0000 |
commit | 1903bfab5d5ceef6df247bbb19c7f7fac26f1edb (patch) | |
tree | b5a9b4206c0990c171608473facee52e416039d0 /examples | |
parent | 18b22e3b8e07871232a39f69d3cd603b5c5b6e0d (diff) | |
download | qtlocation-1903bfab5d5ceef6df247bbb19c7f7fac26f1edb.tar.gz |
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: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/location/places_map/main.cpp | 2 | ||||
-rw-r--r-- | examples/location/places_map/places_map.qml | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/examples/location/places_map/main.cpp b/examples/location/places_map/main.cpp index a2cd8fc0..aeb7eaf3 100644 --- a/examples/location/places_map/main.cpp +++ b/examples/location/places_map/main.cpp @@ -46,6 +46,8 @@ int main(int argc, char **argv) QGuiApplication app(argc,argv); QQuickView view; view.setSource(QUrl(QStringLiteral("qrc:///places_map.qml"))); + view.setWidth(360); + view.setHeight(640); view.show(); return app.exec(); } diff --git a/examples/location/places_map/places_map.qml b/examples/location/places_map/places_map.qml index 467a31de..cd487fa9 100644 --- a/examples/location/places_map/places_map.qml +++ b/examples/location/places_map/places_map.qml @@ -45,8 +45,7 @@ import QtLocation 5.6 //! [Imports] Rectangle { - width: 360 - height: 640 + anchors.fill: parent //! [Initialize Plugin] Plugin { |