Commit 379e1f39 authored by Jens Bache-Wiig's avatar Jens Bache-Wiig Committed by The Qt Project
Browse files

Make TableViewGallery work again


Change-Id: If7dccb4b31a9cace5433f8f8ed650eece9c0f683
Reviewed-by: default avatarJens Bache-Wiig <jens.bache-wiig@digia.com>
parent bf81aca0
6.2 5.10 5.11 5.12 5.12.1 5.12.10 5.12.11 5.12.12 5.12.2 5.12.3 5.12.4 5.12.5 5.12.6 5.12.7 5.12.8 5.12.9 5.13 5.13.0 5.13.1 5.13.2 5.14 5.14.0 5.14.1 5.14.2 5.15 5.15.0 5.15.1 5.15.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.9.8 dev old/5.1 old/5.2 wip/calendar wip/tizen v5.15.0-alpha1 v5.14.1 v5.14.0 v5.14.0-rc2 v5.14.0-rc1 v5.14.0-beta3 v5.14.0-beta2 v5.14.0-beta1 v5.14.0-alpha1 v5.13.2 v5.13.1 v5.13.0 v5.13.0-rc3 v5.13.0-rc2 v5.13.0-rc1 v5.13.0-beta4 v5.13.0-beta3 v5.13.0-beta2 v5.13.0-beta1 v5.13.0-alpha1 v5.12.7 v5.12.6 v5.12.5 v5.12.4 v5.12.3 v5.12.2 v5.12.1 v5.12.0 v5.12.0-rc2 v5.12.0-rc1 v5.12.0-beta4 v5.12.0-beta3 v5.12.0-beta2 v5.12.0-beta1 v5.12.0-alpha1 v5.11.3 v5.11.2 v5.11.1 v5.11.0 v5.11.0-rc2 v5.11.0-rc1 v5.11.0-beta4 v5.11.0-beta3 v5.11.0-beta2 v5.11.0-beta1 v5.11.0-alpha1 v5.10.1 v5.10.0 v5.10.0-rc3 v5.10.0-rc2 v5.10.0-rc1 v5.10.0-beta4 v5.10.0-beta3 v5.10.0-beta2 v5.10.0-beta1 v5.10.0-alpha1 v5.9.9 v5.9.8 v5.9.7 v5.9.6 v5.9.5 v5.9.4 v5.9.3 v5.9.2 v5.9.1 v5.9.0 v5.9.0-rc2 v5.9.0-rc1 v5.9.0-beta4 v5.9.0-beta3 v5.9.0-beta2 v5.9.0-beta1 v5.9.0-alpha1 v5.8.0 v5.8.0-rc1 v5.8.0-beta1 v5.8.0-alpha1 v5.7.1 v5.7.0 v5.7.0-rc1 v5.7.0-beta1 v5.7.0-alpha1 v5.6.3 v5.6.2 v5.6.1 v5.6.1-1 v5.6.0 v5.6.0-rc1 v5.6.0-beta1 v5.6.0-alpha1 v5.5.1 v5.5.0 v5.5.0-rc1 v5.5.0-beta1 v5.5.0-alpha1 v5.4.2 v5.4.1 v5.4.0 v5.4.0-rc1 v5.4.0-beta1 v5.4.0-alpha1 v5.3.2 v5.3.1 v5.3.0 v5.3.0-rc1 v5.3.0-beta1 v5.3.0-alpha1 v5.2.1 v5.2.0 v5.2.0-rc1 v5.2.0-beta1 v5.2.0-alpha1 v5.1.1 v5.1.0 v5.1.0-rc2 v5.1.0-rc1 v5.1.0-beta1 v5.1.0-alpha1
No related merge requests found
Showing with 12 additions and 45 deletions
......@@ -38,8 +38,9 @@
**
****************************************************************************/
import QtQuick 1.0
import QtQuick 2.0
import QtDesktop 1.0
import QtQuick.XmlListModel 2.0
Rectangle {
......@@ -49,7 +50,6 @@ Rectangle {
ToolBar {
id: toolbar
width: parent.width
//height: 40
MouseArea {
anchors.fill: parent
......@@ -59,7 +59,8 @@ Rectangle {
ComboBox {
id: delegateChooser
enabled: frame.current == 4 ? 1 : 0
opacity: frame.current === 3 ? 1 : 0
Behavior on opacity{ NumberAnimation{} }
model: delegatemenu
anchors.left: parent.left
anchors.leftMargin: 8
......@@ -99,7 +100,7 @@ Rectangle {
ListModel {
id: largeModel
Component.onCompleted: {
for (var i=0 ; i< 5000 ; ++i)
for (var i=0 ; i< 500 ; ++i)
largeModel.append({"name":"Person "+i , "age": Math.round(Math.random()*100), "gender": Math.random()>0.5 ? "Male" : "Female"})
}
}
......@@ -153,37 +154,6 @@ Rectangle {
alternateRowColor: alternateCheckbox.checked
}
}
Tab {
title: "DirModel"
TableView {
model: FileSystemModel{}
anchors.fill: parent
anchors.margins: 12
TableColumn {
role: "fileName"
title: "File Name"
width: 120
}
TableColumn {
role: "filePath"
title: "File Path"
width: 120
}
TableColumn {
role: "fileSize"
title: "Image source"
width: 200
visible: true
}
frame: frameCheckbox.checked
headerVisible: headerCheckbox.checked
sortIndicatorVisible: sortableCheckbox.checked
alternateRowColor: alternateCheckbox.checked
}
}
Tab {
title: "Multivalue "
......@@ -283,18 +253,14 @@ Rectangle {
Component {
id: slickRowDelegate
Rectangle{
color: itemAlternateBackground ? "#cef" : "white"
// selected: itemSelected ? "true" : "false"
}
Rectangle { color: itemAlternateBackground ? "#cef" : "white" }
}
Component {
id: delegate2
Item {
height: itemSelected? 60 : 20
Behavior on height{ NumberAnimation{}}
Behavior on height{ NumberAnimation{} }
Text {
width: parent.width
anchors.margins: 4
......@@ -367,6 +333,7 @@ Rectangle {
}
rowDelegate: Rectangle {
height: 20
color: itemSelected ? "#448" : (itemAlternateBackground ? "#eee" : "#fff")
border.color:"#ccc"
border.width: 1
......@@ -374,11 +341,11 @@ Rectangle {
anchors.leftMargin: -2
anchors.rightMargin: -1
BorderImage{
id:selected
id: selected
anchors.fill: parent
source: "images/selectedrow.png"
visible: itemSelected
border{left:2;right:2;top:2;bottom:2}
border{left:2; right:2; top:2; bottom:2}
SequentialAnimation {
running: true; loops: Animation.Infinite
NumberAnimation { target:selected; property: "opacity"; to: 1.0; duration: 900}
......@@ -388,7 +355,7 @@ Rectangle {
}
itemDelegate: {
switch(delegateChooser.selectedIndex) {
switch (delegateChooser.selectedIndex) {
case 0:
return delegate1
case 1:
......@@ -401,7 +368,7 @@ Rectangle {
}
}
Row{
x:12
x: 12
height: 34
CheckBox{
id: alternateCheckbox
......
Supports Markdown
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