diff options
Diffstat (limited to 'tests/auto/quickcontrols2/qquickpopup/data')
5 files changed, 114 insertions, 0 deletions
diff --git a/tests/auto/quickcontrols2/qquickpopup/data/applicationwindow-wheel.qml b/tests/auto/quickcontrols2/qquickpopup/data/applicationwindow-wheel.qml index 073300a36c..1668b042e0 100644 --- a/tests/auto/quickcontrols2/qquickpopup/data/applicationwindow-wheel.qml +++ b/tests/auto/quickcontrols2/qquickpopup/data/applicationwindow-wheel.qml @@ -11,6 +11,7 @@ ApplicationWindow { height: 400 property alias popup: popup + property alias nestedPopup: nestedPopup property alias popupSlider: popupSlider property alias contentSlider: contentSlider @@ -30,5 +31,13 @@ ApplicationWindow { id: popupSlider wheelEnabled: true } + + Popup { + id: nestedPopup + x: 0; y: 0 + clip: true + implicitWidth: 50 + implicitHeight: 50 + } } } diff --git a/tests/auto/quickcontrols2/qquickpopup/data/mirroredCombobox.qml b/tests/auto/quickcontrols2/qquickpopup/data/mirroredCombobox.qml new file mode 100644 index 0000000000..ed48179bce --- /dev/null +++ b/tests/auto/quickcontrols2/qquickpopup/data/mirroredCombobox.qml @@ -0,0 +1,26 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Controls + +Window { + width: 400 + height: 400 + + contentItem.rotation: 180 + + ComboBox { + objectName: "first" + x: 100 + y: 300 // is missing space, needs to unroll in the "mirrored" direction + model: ["First", "Second", "Third", "Fourth", "Fifth"] + } + + ComboBox { + objectName: "second" + x: 200 + y: 100 // has enough space to unroll + model: ["A", "B", "C"] + } +} diff --git a/tests/auto/quickcontrols2/qquickpopup/data/nested-wheel.qml b/tests/auto/quickcontrols2/qquickpopup/data/nested-wheel.qml new file mode 100644 index 0000000000..a0b319fd24 --- /dev/null +++ b/tests/auto/quickcontrols2/qquickpopup/data/nested-wheel.qml @@ -0,0 +1,44 @@ +import QtQuick +import QtQuick.Controls + +ApplicationWindow { + width: 400 + height: 400 + + property alias modalPopup: popup + property alias comboBox: combobox + + Popup { + id: popup + objectName: "Modal Dialog" + width: 300 + height: 300 + anchors.centerIn: parent + visible: true + modal: true + + ComboBox { + id: combobox + anchors.centerIn: parent + width: 120 + model: 30 + + popup: Popup { + objectName: "Combobox Popup" + y: combobox.height + width: combobox.width + height: contentItem.implicitHeight + contentItem: ListView { + objectName: "Combobox ListView" + clip: true + implicitHeight: 150 + model: combobox.delegateModel + currentIndex: combobox.highlightedIndex + ScrollBar.vertical: ScrollBar { + objectName: "vbar" + } + } + } + } + } +} diff --git a/tests/auto/quickcontrols2/qquickpopup/data/rotatedCombobox.qml b/tests/auto/quickcontrols2/qquickpopup/data/rotatedCombobox.qml new file mode 100644 index 0000000000..df217be4b7 --- /dev/null +++ b/tests/auto/quickcontrols2/qquickpopup/data/rotatedCombobox.qml @@ -0,0 +1,26 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Controls + +Window { + width: 400 + height: 400 + + contentItem.rotation: 90 + + ComboBox { + objectName: "first" + x: 100 + y: 320 // is missing space, needs to unroll in the "mirrored" direction + model: ["First", "Second", "Third", "Fourth", "Fifth"] + } + + ComboBox { + objectName: "second" + x: 200 + y: 100 // has enough space to unroll + model: ["A", "B", "C"] + } +} diff --git a/tests/auto/quickcontrols2/qquickpopup/data/window-wheel.qml b/tests/auto/quickcontrols2/qquickpopup/data/window-wheel.qml index 315c3f2a78..ae9c2ecdfd 100644 --- a/tests/auto/quickcontrols2/qquickpopup/data/window-wheel.qml +++ b/tests/auto/quickcontrols2/qquickpopup/data/window-wheel.qml @@ -11,6 +11,7 @@ Window { height: 400 property alias popup: popup + property alias nestedPopup: nestedPopup property alias popupSlider: popupSlider property alias contentSlider: contentSlider @@ -30,5 +31,13 @@ Window { id: popupSlider wheelEnabled: true } + + Popup { + id: nestedPopup + x: 0; y: 0 + clip: true + implicitWidth: 50 + implicitHeight: 50 + } } } |