Added IBeam cursor to line edit

This commit is contained in:
Digital Artifex
2026-08-09 02:40:20 -04:00
parent 68acb2a914
commit a8c0b981e9
+14 -3
View File
@@ -62,10 +62,12 @@ Item {
id: lineEditRoot id: lineEditRoot
ColumnLayout { ColumnLayout
{
anchors.fill: parent anchors.fill: parent
Rectangle { Rectangle
{
id: lineEditBackground id: lineEditBackground
border.color: lineEditRoot.border.color border.color: lineEditRoot.border.color
@@ -87,7 +89,8 @@ Item {
topLeftRadius: lineEditRoot.radius.topLeft topLeftRadius: lineEditRoot.radius.topLeft
topRightRadius: lineEditRoot.radius.topRight topRightRadius: lineEditRoot.radius.topRight
TextInput { TextInput
{
id: lineEditInput id: lineEditInput
anchors.fill: parent anchors.fill: parent
color: lineEditRoot.color color: lineEditRoot.color
@@ -101,6 +104,14 @@ Item {
onAccepted: () => lineEditRoot.accepted() onAccepted: () => lineEditRoot.accepted()
onTextChanged: () => lineEditRoot.text = lineEditInput.text onTextChanged: () => lineEditRoot.text = lineEditInput.text
onEditingFinished: () => lineEditRoot.editingFinished() onEditingFinished: () => lineEditRoot.editingFinished()
MouseArea
{
anchors.fill: parent
cursorShape: Qt.IBeamCursor
onClicked: () => lineEditInput.focus = true
}
} }
states: [ states: [