From f79a93dc2b5a1f0fa182eaa67f2ef8e1024af782 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Tue, 30 Nov 2021 17:25:15 +0100 Subject: [PATCH] QmlDesigner: Hide ComboBox ScrollBar if not needed Change-Id: I1e8d9917b7b966b6c4e68459185c54dda7d21015 Reviewed-by: Thomas Hartmann Reviewed-by: --- .../imports/StudioControls/ComboBox.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml index 98fdccddb0d..bb8166326a2 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml @@ -203,13 +203,15 @@ T.ComboBox { | T.Popup.CloseOnReleaseOutsideParent contentItem: ListView { + id: listView clip: true - implicitHeight: contentHeight + implicitHeight: listView.contentHeight model: myComboBox.popup.visible ? myComboBox.delegateModel : null currentIndex: myComboBox.highlightedIndex boundsBehavior: Flickable.StopAtBounds ScrollBar.vertical: ScrollBar { id: comboBoxPopupScrollBar + visible: listView.height < listView.contentHeight } }