From 92bcea463ff8ba7ac89e8ad19ee766ca3279db3e Mon Sep 17 00:00:00 2001 From: Ali Kianian Date: Thu, 16 Mar 2023 13:38:45 +0200 Subject: [PATCH] QmlDesigner: Handle text overflow state for ComboBox - Text is elided in the overflow state. - Text is aligned to the left in the overflow state. Task-number: QDS-9402 Change-Id: If1cca917a42b8198729591506e8a886ea9a70814 Reviewed-by: Reviewed-by: Mahmoud Badri Reviewed-by: Miikka Heikkinen --- .../imports/StudioControls/ComboBoxInput.qml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBoxInput.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBoxInput.qml index a5d95e84d38..67b28746ada 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBoxInput.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBoxInput.qml @@ -32,6 +32,20 @@ TextInput { selectByMouse: false activeFocusOnPress: false clip: true + echoMode: TextInput.NoEcho + + Text { + id: elidableText + anchors.fill: control + leftPadding: control.leftPadding + rightPadding: control.rightPadding + horizontalAlignment: control.horizontalAlignment + verticalAlignment: control.verticalAlignment + font: control.font + color: control.color + text: control.text + elide: Text.ElideRight + } Rectangle { id: background @@ -128,6 +142,14 @@ TextInput { target: background color: control.style.background.interaction } + PropertyChanges { + target: control + echoMode: TextInput.Normal + } + PropertyChanges { + target: elidableText + visible: false + } PropertyChanges { target: mouseArea cursorShape: Qt.IBeamCursor