[Interest] qt.labs.controls - ApplicationWindow - size
ekke
ekke at ekkes-corner.org
Fri Apr 8 12:43:56 CEST 2016
the Gallery example from qt.labs.controls
http://doc.qt.io/qt-5/qtlabscontrols-gallery-gallery-qml.html
defines the ApplicationWindow this way:
ApplicationWindow
<http://doc.qt.io/qt-5/qml-qt-labs-controls-applicationwindow.html> {
id: window
width: 360
height: 520
visible: true
title: "Qt Labs Controls"
My question is about the width and height.
I'm using it only for mobile APPs on Android and iOS
On a mobile device the ApplicationWindow always has to fill the entire
available space,
so it doesn't make sense to start with a fixed size width / height I think
what's recommended ?
should I remove width and height settings and let Qt calculate without ?
Or should I set the width and height from QScreen ?
this works:
context->setContextProperty("myScreen",qApp->primaryScreen());
and then I can use
width:myScreen.size.width // or better .availableSize.width ?
have tested: size is correct and also changes if rotating from portrait
to landscape
thx for infos
ekke
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160408/6fac327c/attachment.html>
More information about the Interest
mailing list