[SOLVED]adding width to a rectangle when mousearea is clicked
-
i want to add width to my rectangle when mousearea is clicked, after clicking the mousarea it stops adding, I use this rectangle as a progressbar
How can i solve this?this is my code
@ Rectangle {
id: rectangle1
x: 121
y: 222
width: 50
height: 21
color: "#8b4646"
}
MouseArea {
id: ahome2feed
x: 40
y: 76
width: 99
height: 46
opacity: 1
onClicked:{
rectangle1.width = ((50)+25)
rectangle1.color = "#8b6746";
}
@ -
Change your line 17 with
@
rectangle1.width = (rectangle1.width+25)
@ -
If it's of any use, there's already a "ProgressBar element":http://doc.qt.nokia.com/qt-components-symbian-1.0/qml-progressbar.html available in Qt Components.