Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Help with this simple property change

$
0
0
I have this: Rectangle{         id:testrect           property color gradcolor:"#8C8F8C"         gradient:             Gradient {             GradientStop { position: 0.0; color: gradcolor }             GradientStop { position: 0.17; color: "#6A6D6A" }             GradientStop { position: 0.77; color: "#3F3F3F" }             GradientStop { position: 1.0; color: "#6A6D6A" }             } In a child MouseArea, I want to do this:  onEntered: {                 testrect.gradcolor="white"                 parent.border.color = Qt.lighter("#6A6D6A") The border color is changing as desired, but the gradient colors are not. Is it because the gradient is not pulling from the gradcolor property in real time? What is the best way to approach this?

Viewing all articles
Browse latest Browse all 4972

Trending Articles