[Qt-qml] can Anchor-based layout be conditional?
Rakesh.Mutharaju at tieto.com
Rakesh.Mutharaju at tieto.com
Mon Apr 19 09:22:11 CEST 2010
Hello,
I am quite new to Qt-Quick. Well, i am trying to use the same view for landscape and potrait modes of screen orientation.
If i have anchored Rectangle to the view something like
Rectangle{
anchors.bottom: parent.bottom
anchors.bottomMargin: 5
}
And if I change the screen orientation I would like to have the same rectangle at
Rectange{
anchors.top:parent.top
anchors.topMargin: 5
anchors.left:parent.left
anchors.leftMargin: 10
}
I guess this requires some sort of logic to reset the anchors on change of orientation and then have a new set of achors w.r.t to new view.I can write a new state and map it to screen orientation.But, how can I change the anchors?
Could someone tell me how to reset the anchors on orientation changes? Or the other alternative seems to have the anchors based on conditions.
Thanks and Regards,
Rakesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100419/a2bc455b/attachment.html
More information about the Qt-qml
mailing list