diff options
author | Bea Lam <bea.lam@nokia.com> | 2012-03-20 11:37:10 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-17 06:09:56 +0200 |
commit | 0d52c081a1650dc6a3a9b02c7fa5345c94ca6597 (patch) | |
tree | c0c887fc56471b28c7e238bb449fe2d14a254f84 /tests/auto/quick/qquicklistview/data/headerfooter.qml | |
parent | bf55fe91ed0e6a0673f66d1792605c632b1aa99e (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/headerfooter.qml')
-rw-r--r-- | tests/auto/quick/qquicklistview/data/headerfooter.qml | 15 |
1 files changed, 6 insertions, 9 deletions
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 } |