diff options
Diffstat (limited to 'tests/auto/quick/qquicklistview2/data/buttonDelegate.qml')
-rw-r--r-- | tests/auto/quick/qquicklistview2/data/buttonDelegate.qml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicklistview2/data/buttonDelegate.qml b/tests/auto/quick/qquicklistview2/data/buttonDelegate.qml new file mode 100644 index 0000000000..a40ba1cd7e --- /dev/null +++ b/tests/auto/quick/qquicklistview2/data/buttonDelegate.qml @@ -0,0 +1,27 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +ListView { + id: root + width: 320 + height: 480 + model: 100 + + property var pressedDelegates: [] + property var releasedDelegates: [] + property var tappedDelegates: [] + property var canceledDelegates: [] + + delegate: Button { + required property int index + objectName: text + text: "button " + index + height: 100 + width: 320 + + onPressed: root.pressedDelegates.push(index) + onReleased: root.releasedDelegates.push(index) + onClicked: root.tappedDelegates.push(index) + onCanceled: root.canceledDelegates.push(index) + } +} |