aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview/data
diff options
context:
space:
mode:
authorJoni Poikelin <joni.poikelin@qt.io>2017-10-23 13:51:43 +0300
committerShawn Rutledge <shawn.rutledge@qt.io>2017-11-07 12:21:11 +0000
commit54f15f5df5cf545bf4d675ccbafecd482b4a2b0b (patch)
treef81754ed545e25a397d3c1d93c1594902a087be7 /tests/auto/quick/qquicklistview/data
parent4331ccd4b735d9d721a384193a3d42ee2ce6c805 (diff)
Fix ListView::positionViewAtIndex with ListView.Contain mode
Sticky headers and footers weren't accounted for when calculating new view position causing the requested item to be left behind them. Task-number: QTBUG-63974 Change-Id: Id69579643a942e8558960b2c8b0fee980fa86947 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/quick/qquicklistview/data')
-rw-r--r--tests/auto/quick/qquicklistview/data/qtbug63974.qml34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicklistview/data/qtbug63974.qml b/tests/auto/quick/qquicklistview/data/qtbug63974.qml
new file mode 100644
index 0000000000..1e0afa54f8
--- /dev/null
+++ b/tests/auto/quick/qquicklistview/data/qtbug63974.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.6
+
+ListView {
+ id: table
+ height: 200
+ width: 100
+
+ headerPositioning: ListView.OverlayHeader
+ header: Rectangle {
+ width: table.width
+ height: 20
+ color: "red"
+ z: 100
+ }
+
+ footerPositioning: ListView.OverlayFooter
+ footer: Rectangle {
+ width: table.width
+ height: 20
+ color: "blue"
+ z: 200
+ }
+
+ model: 30
+ delegate: Rectangle {
+ height: 20
+ width: table.width
+ color: "lightgray"
+ Text {
+ text: "Item " + index
+ anchors.centerIn: parent
+ }
+ }
+}