On Fri, 2011-03-18 at 09:42 +1000, Alan Alpert wrote:
> Another approach that might be more general but hard to apply to your
> situation is to use the Connections element for the signal connections. You
> can set the target to null when the item is not visible, and then back to the
> intended target when the item is visible. This may not work for the automatic
> connections set up by models though.
Thanks for your answer, I'll try this as well. What I don't really like
with most of those solutions is that I have to put in a lot of
additional code.
Either I have do something like this is many many places:
SomeItem {
text: isCurrentScreen ? backend.activePoi.name : ""
image: isCurrentScreen ? backend.activePoi.image : ""
}
Or I have to create a lot of Connection elements to do the same. What I
would like to have would be something like:
MyScreen {
active: isCurrentScreen
SomeItem {
text: backend.actitvePoi.name
image: backend.activePoi.image
}
}
If 'active == false' all child elements would stop reacting on property
changes or other signals and animations would stop.
I think especially in combination with 'Qt.application.active' we need a
way to quickly disable animations and signal handlers. But also we need
to do this selectively.
For instance, I might want to disable visual updates on a map view, but
still play a sound once I'm close to a certain location.
Does this make any sense? How do you solve those issues?
Thanks!
Conny
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml