From 4b2fae2a900f4e66db36ee9e0ee2615346eeccdc Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Wed, 4 Dec 2013 22:18:36 +0100 Subject: Set highlight size for both dimensions, irrespective of ListView orientation The assumption that all list delegates are the same size (dependent on ListView orientation) is not a correct one, even if it is correct most of the time. Task-number: QTBUG-31626 Change-Id: Iba6f3bc5f38d60e3be7632ab17d0c66ab8e73965 Reviewed-by: Matthew Vogt Reviewed-by: J-P Nurmi Reviewed-by: Alan Alpert --- .../quick/qquicklistview/data/HighlightResize.qml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/auto/quick/qquicklistview/data/HighlightResize.qml (limited to 'tests/auto/quick/qquicklistview/data') diff --git a/tests/auto/quick/qquicklistview/data/HighlightResize.qml b/tests/auto/quick/qquicklistview/data/HighlightResize.qml new file mode 100644 index 0000000000..2b07b39d20 --- /dev/null +++ b/tests/auto/quick/qquicklistview/data/HighlightResize.qml @@ -0,0 +1,23 @@ +import QtQuick 2.0 + +ListView { + id: view + + width: 400 + height: 400 + model: 5 + + highlight: Rectangle { + color: "skyblue" + } + + delegate: Item { + width: 100 + index * 20 + height: 100 + index * 10 + + Text { + anchors.centerIn: parent + text: model.index + } + } +} -- cgit v1.2.1