-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
6.4.2
This example has two ComboBox items with the same model, which contains 200 items.
When you click on the one which is directly visible at startup, you can scroll in the popup with the mouse wheel, as expected.
However, if you open the drawer by clicking the button, it will show an equal ComboBox inside a Drawer. If you open the ComboBox popup, scrolling via mouse wheel does not work. It is only scrollable by click and hold the scroll bar.
Window {
id: win
width: 640
height: 480
visible: true
title: "Sandbox"
readonly property ListModel listModel: ListModel {
ListElement { key: "1"; value: 0 }
ListElement { key: "2"; value: 1 }
// ...
ListElement { key: "202"; value: 201 }
}
Button {
id: btn
anchors.centerIn: parent
text: 'Open drawer'
onClicked: () => drawer.open()
}
ComboBox {
anchors {
horizontalCenter: parent.horizontalCenter
bottom: btn.top
bottomMargin: 50
}
model: win.listModel
textRole: 'key'
}
Drawer {
id: drawer
width: win.width
height: win.height
edge: Qt.BottomEdge
ComboBox {
anchors.centerIn: parent
model: win.listModel
textRole: 'key'
}
}
}
See the attached file for a complete working example.