Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.7.3, 6.8.0
Description
A minimal example:
import QtQuick import QtQuick.Controls.Basic Window { width: 640 height: 480 visible: true Item { id: root objectName: "CustomCombobox" x: 10 y: 300 width: 200 height: 20 ComboBox{ id:control anchors.fill: parent model: 100 popup: Popup { id: popupList x: 0 y: control.height implicitWidth: 200 implicitHeight: contentItem.implicitHeight contentItem: ListView { id:listItems implicitHeight: contentHeight clip: true interactive: true model: control.popup.visible ? control.delegateModel : null currentIndex: control.highlightedIndex } } } } }
That works as expected when there are 100 entries in model, that Popup pops out on top /from the bottom of ComboBox (depending on whether there are more space on top or bottom). But when there are only 10 entries, i.e. model: 10, then ComboBox is totally covered up by its Popup, which is an undesired behavior.
The current workaround is to explicitly set a height or implicitHeight for Popup.
It is speculated that popup positioner is doing some optimizations internally. But the result can be unexpected.