Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Item
- {
- ListModel
- {
- id: myModel
- ListElement
- {
- name: "Item1"
- type: 1
- status: true
- description: "Long description"
- }
- ListElement
- {
- name: "Item2"
- type: 2
- status: false
- description: "Another long description"
- }
- }
- ListView
- {
- id: myList
- model: myModel
- delegate: Item
- {
- // Access item's roles
- Text
- {
- text: name
- color: status ? "green" : "gray"
- }
- }
- }
- SelectedItemView
- {
- sourceView: myView
- delegate: Item
- {
- // Access item's roles
- // Shows only for selected item
- Text
- {
- text: description
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement