Hi, Maybe it's a good idea to have some properties to lock the window in portrait or landscape mode from qml side. This will avoid platform specific code from the C++ side (symbian/maemo).
br, Adriano On Wed, Apr 14, 2010 at 2:41 AM, Leonardo Sobral Cunha <[email protected]> wrote: > hi, > > We just added a 'runtime' object in the root context. This 'runtime' has for > now 2 properties: 'orientation' and 'isActiveWindow' > > below are two examples on how to use the runtime properties, you just need to > import Qt 4.7 > > import Qt 4.7 > Item { > state: (runtime.orientation == Orientation.Landscape) ? 'landscape' : '' > } > > import Qt 4.7 > Item { > width: 300; height: 200 > Rectangle { > width: 100; height: 100 > color: "green" > SequentialAnimation on x { > running: runtime.isActiveWindow > loops: Animation.Infinite > NumberAnimation {to: 200} > NumberAnimation {to: 0} > } > } > } > > NOTE that we removed the previous way of accessing the orientation through the > Screen element . > > the qmlruntime docs are also updated. > this change is still the qml repo waiting to be integrated. > > br, > leo > _______________________________________________ > 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
