I have read http://lists.trolltech.com/pipermail/qt-qml/2010-May/000302.html but I don't really like that workaround. Would it be possible to use StateChangeScript to change element's gradient? What I would to acquire is something like this:
Rectangle { id: rect function setActiveGradient() { rect.gradient = new ActiveGradient(); } states: State { name: "active" StateChangeScript { name: "changeGradient" script: rect.setActiveGradient() } } gradient: InactiveGradient {} } My JS skills are almost non-existing as you can see. _______________________________________________ Qt-qml mailing list Qt-qml@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-qml