[Qt-qml] How to see screen (or preferably window) dimensions?

michael.brasser at nokia.com michael.brasser at nokia.com
Thu Nov 11 02:48:27 CET 2010


On 10/11/2010, at 8:55 AM, ext Bart Kelsey wrote:

> Greets!
> 
> Is there some way from within QML that I can get the dimensions of the QDecarativeView that my QML objects are in, short of writing a special C++ function?

This isn't directly accessible, but setting the resize mode of the QDeclarativeView to SizeRootObjectToView (if that's applicable in your case) will ensure that your top-level item is sized to the view, which would allow you to query the root item for this information.

Regards,
Michael





More information about the Qt-qml mailing list