[Qt-qml] Extending state in a descendant
Artem Marchenko
artem.marchenko at gmail.com
Fri Jun 17 15:22:39 CEST 2011
Hi All
I have a hierarchy of layouts extending each other so that I could have a Base layout and minor modifications specific to the platform. For example, in Symbian I prefer drawing statusLine myself, while on Maemo I am happy with the system one. There are also minor portait-landscape differences here and there.
So I define portrait/landscape states in Base.qml and try extending them in Symbian.qml/Maemo.qml and.. I don't know how to do it.
Is it possible to somehow add changes to an existing state?
==Base.qml==
Rectangle {
...
states: [
State {
id: stateLandscape
name: "landscape"
when: isInLandscape
PropertyChanges {
...
}
==Maemo.qml==
Base {
// states: null - that modification is possible
states: [ // somehow it doesn't change the existing states. Base's "landscape" state still exists
State {
name: "maemoLandscape"
when: isInLandscape // then it's never activated, Base's state with the same condition is activated first
// or maybe maemoLandscape is never even added the states list?
}
]
AnchorChanges {
parent: stateLandscape // that I also tried, but it doesn't work as changes are not visual and don't have a parent property
...
}
}
Best regards,
Artem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110617/ba65f101/attachment-0001.html
More information about the Qt-qml
mailing list