12 ListElement { itemColor: "red" }
13 ListElement { itemColor: "green" }
14 ListElement { itemColor: "blue" }
15 ListElement { itemColor: "orange" }
16 ListElement { itemColor: "purple" }
17 ListElement { itemColor: "yellow" }
18 ListElement { itemColor: "slategrey" }
19 ListElement { itemColor: "cyan" }
23 id: listItem; Package.name: "list"; width:root.width/2; height: 25; color: "transparent"; border.color: "white"
26 onClicked: myState.state = myState.state == "list" ? "grid" : "list"
30 id: gridItem; Package.name: "grid"; width:50; height: 50; color: "transparent"; border.color: "white"
33 onClicked: myState.state = myState.state == "list" ? "grid" : "list"
36 Rectangle { id: myContent; width:50; height: 50; color: itemColor }
44 ParentChange { target: myContent; parent: listItem }
45 PropertyChanges { target: myContent; x: 0; y: 0; width: listItem.width; height: listItem.height }
49 ParentChange { target: myContent; parent: gridItem }
50 PropertyChanges { target: myContent; x: 0; y: 0; width: gridItem.width; height: gridItem.height }
59 NumberAnimation { properties: "x,y,width,height"; easing.type: "InOutQuad" }
71 model: model.parts.list
80 model: model.parts.grid