Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 1.0
- Rectangle {
- width: 300; height: 400
- ListModel {
- id: appModel
- ListElement { modelcolor: "#FF0000"}
- ListElement { modelcolor: "#00FF00"}
- ListElement { modelcolor: "#0000FF"}
- }
- Component {
- id: appDelegate
- Rectangle {
- width: 100; height: 100
- color: modelcolor
- MouseArea {
- anchors.fill: parent
- onClicked: parent.x = -50
- }
- Behavior on x {
- NumberAnimation {
- duration: 2000
- }
- }
- Behavior on y {
- NumberAnimation {
- duration: 2000
- }
- }
- }
- }
- GridView {
- anchors.fill: parent
- model: appModel
- delegate: appDelegate
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement