Commit 5161d14a authored by Jens Bache-Wiig's avatar Jens Bache-Wiig
Browse files

Move ItemViewGallery to TableViewGallery

parent d66fb000
No related merge requests found
Showing with 32 additions and 21 deletions
...@@ -50,21 +50,15 @@ Rectangle { ...@@ -50,21 +50,15 @@ Rectangle {
} }
ListModel { ListModel {
id: listModel id: nestedModel
ListElement{ ListElement{
title: "Some title" attributes: ListElement { description: "Core" ; color:"#ffaacc"}
imageSource: "imagesource"
credit: "credit"
} }
ListElement{ ListElement{
title: "Some title 2" attributes: ListElement { description: "Second" ; color:"#ffccaa"}
imageSource: "imagesource"
credit: "credit"
} }
ListElement{ ListElement{
title: "Some title 3" attributes: ListElement { description: "Third" ; color:"#ffffaa"}
imageSource: "imagesource"
credit: "credit"
} }
} }
...@@ -91,7 +85,7 @@ Rectangle { ...@@ -91,7 +85,7 @@ Rectangle {
tabbar: TabBar{parent: frame} tabbar: TabBar{parent: frame}
property int margins : styleitem.style == "mac" ? 16 : 0 property int margins : styleitem.style == "mac" ? 16 : 0
height:parent.height - 34 height: parent.height - 34
anchors.right: parent.right anchors.right: parent.right
anchors.left: parent.left anchors.left: parent.left
anchors.margins: margins anchors.margins: margins
...@@ -99,7 +93,6 @@ Rectangle { ...@@ -99,7 +93,6 @@ Rectangle {
Tab { Tab {
title: "XmlListModel" title: "XmlListModel"
TableView { TableView {
model: flickerModel model: flickerModel
...@@ -132,21 +125,39 @@ Rectangle { ...@@ -132,21 +125,39 @@ Rectangle {
} }
} }
Tab { Tab {
title: "ListModel" title: "Multivalue "
TableView{ TableView{
model: listModel model: nestedModel
anchors.fill: parent anchors.fill: parent
anchors.margins: 12 anchors.margins: 12
TableColumn { TableColumn {
property: "title" property: "attributes"
caption: "Title" caption: "Text and Color"
width: 120 width: 220
} }
TableColumn {
property: "credit" itemDelegate:
caption: "Credit" Item {
width: 120 Rectangle{
color: itemValue.get(0).color
anchors.top:parent.top
anchors.right:parent.right
anchors.bottom:parent.bottom
anchors.margins: 4
width:32
border.color:"#666"
}
Text {
width: parent.width
anchors.margins: 4
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
elide: itemElideMode
text: itemValue.get(0).description
color: itemForeground
}
} }
frame: frameCheckbox.checked frame: frameCheckbox.checked
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment