[Qt-qml] Changing gradient in PropertyChanges

Pertti Kellomäki pertti.kellomaki at nokia.com
Mon May 10 09:54:39 CEST 2010


Is it possible to change the gradient of an element in PropertyChanges? 
I tried making a fancy button with in QML, but when I try to  change the 
gradient I get the error message 
"PropertyChanges does not support creating state-specific objects." 
Here's the relevant snippet:

     State {
         name: 'pressed'
         PropertyChanges {
             target: self
             gradient:  Gradient {
                 GradientStop { position: 0.0; color: 'gray' }
                 GradientStop { position: 1.0; color: 'lightgray' }
             }
         }
     }

-- 
Pertti




More information about the Qt-qml mailing list