It seems the issue you're experiencing with the ComboBox not scrolling when there are many items is due to the absence of proper height configuration for the ListView inside the Popup. The ListView needs an explicit height to trigger scrolling behavior, and without it, the dropdown won't scroll even when there are many items.
To fix this, you can add a fixed or constrained height to the ListView, and ensure the ScrollIndicator appears when needed. Here's the updated code for the popup section:
popup: Popup {
y: control.height - 1
width: control.width
implicitHeight: contentItem.implicitHeight
padding: 0
contentItem: ListView {
width: parent.width
height: Math.min(200, contentHeight) // Constrain the ListView height or set a max height
clip: true
model: control.popup.visible ? control.delegateModel : null
currentIndex: control.highlightedIndex
ScrollIndicator.vertical: ScrollIndicator {
visible: contentHeight > height // Only show the scroll indicator if the content exceeds the viewable area
}
}
background: Rectangle {
radius: 0
color: Qt.color(AppTheme.colors["UFO_ComboBox_Popup_Background"])
border.color: Qt.color(AppTheme.colors["UFO_ComboBox_DropBox_Border"])
}
}