Hi, you don't want to react to width/height changes. You want to react to _rotation_, and this is exposed by the runtime.orientation property in the qmlviewer. The orientation can be changed for testing purposes by Ctrl+T.
Have a look at the calculator demo to see how you can make use of this property. Kai -- Kai Koehne Software Engineer Nokia, Qt Development Frameworks Nokia gate5 GmbH Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B Umsatzsteueridentifikationsnummer: DE 812 845 193 Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori ________________________________________ From: [email protected] [[email protected]] On Behalf Of ext Jason H [[email protected]] Sent: Tuesday, July 13, 2010 3:21 PM To: Alpert Alan (Nokia-MS-Qt/Brisbane); [email protected] Subject: Re: [Qt-qml] Fw: Why can't I stylesheet a font? So if I had an N8, and my app runing on it, my app would get two property changes? (root.width & root.height) Could I suggest that the QML viewer app then have an option to resize the screen by swapping the screen coordinates (width & height) so that we can test our resize handlers? > Resizing is that the dimensions of the root object change. Rotation changes a > property on an object exposed by the viewer (and possibly your application). > You can respond to these however you wish, and this enables you to radically > relayout the application on size changes so as to always make the best use of >the size (e.g., past a certain size it switches to two columns, and then to >three). >Note that you can also make relative positions with bindings, not just > anchors. E.g. x: root.width/3 . -- Alan Alpert Software Engineer Nokia, Qt Development Frameworks _______________________________________________ Qt-qml mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-qml _______________________________________________ Qt-qml mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-qml _______________________________________________ Qt-qml mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-qml
