[SOLVED] Move a rectangle (set left,top)
-
Hello,
I get the error "cannot assign readonly property" with this code
@
MouseArea {
anchors.fill: parent
onClicked: {
rectangle1.left=100
rectangle1.top=150
}
}
@Thank you
-
Left and top are anchros lines, not coordinates. Items in QML have x, y, width and height. See "Anchor-based Layout in QML":http://doc.qt.nokia.com/4.7-snapshot/qml-anchor-layout.html
-
Thank you
This solved my problem.
-
Be sure and edit the title of the thread to add [Solved]. Thanks!