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: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Ali Kianian
2023-03-16 13:38:45 +02:00
parent ed5d0e106a
commit 92bcea463f

View File

@@ -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