aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview/data
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2012-03-20 11:37:10 +1000
committerQt by Nokia <qt-info@nokia.com>2012-04-17 06:09:56 +0200
commit0d52c081a1650dc6a3a9b02c7fa5345c94ca6597 (patch)
treec0c887fc56471b28c7e238bb449fe2d14a254f84 /tests/auto/quick/qquicklistview/data
parentbf55fe91ed0e6a0673f66d1792605c632b1aa99e (diff)
Vertical layout direction for ListView and GridView
Provide verticalLayoutDirection property with TopToBottom and BottomToTop values. Change-Id: If6f0da5dd4735036162868d391852a661854de5b Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquicklistview/data')
-rw-r--r--tests/auto/quick/qquicklistview/data/header.qml2
-rw-r--r--tests/auto/quick/qquicklistview/data/headerfooter.qml15
2 files changed, 7 insertions, 10 deletions
diff --git a/tests/auto/quick/qquicklistview/data/header.qml b/tests/auto/quick/qquicklistview/data/header.qml
index bf70310630..1cc4ae09ee 100644
--- a/tests/auto/quick/qquicklistview/data/header.qml
+++ b/tests/auto/quick/qquicklistview/data/header.qml
@@ -15,7 +15,7 @@ Rectangle {
height: 30
width: 240
Text {
- text: index + " " + x + "," + y
+ text: index + " " + parent.x + "," + parent.y
}
color: ListView.isCurrentItem ? "lightsteelblue" : "white"
}
diff --git a/tests/auto/quick/qquicklistview/data/headerfooter.qml b/tests/auto/quick/qquicklistview/data/headerfooter.qml
index 4c3eeca328..07a331a4b7 100644
--- a/tests/auto/quick/qquicklistview/data/headerfooter.qml
+++ b/tests/auto/quick/qquicklistview/data/headerfooter.qml
@@ -2,27 +2,24 @@ import QtQuick 2.0
ListView {
id: view
- property bool horizontal: false
- property bool rtl: false
+
width: 240
height: 320
model: testModel
-
- orientation: horizontal ? ListView.Horizontal : ListView.Vertical
+
header: Rectangle {
objectName: "header"
- width: horizontal ? 20 : view.width
- height: horizontal ? view.height : 20
+ width: orientation == ListView.Horizontal ? 20 : view.width
+ height: orientation == ListView.Horizontal ? view.height : 20
color: "red"
}
footer: Rectangle {
objectName: "footer"
- width: horizontal ? 30 : view.width
- height: horizontal ? view.height : 30
+ width: orientation == ListView.Horizontal ? 30 : view.width
+ height: orientation == ListView.Horizontal ? view.height : 30
color: "blue"
}
delegate: Text { width: 30; height: 30; text: index + "(" + x + ")" }
- layoutDirection: rtl ? Qt.RightToLeft : Qt.LeftToRight
}