summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/controls/Private/TextHandle.qml6
-rw-r--r--src/controls/Styles/Base/TextAreaStyle.qml6
-rw-r--r--src/controls/Styles/Base/TextFieldStyle.qml6
-rw-r--r--src/controls/TextArea.qml2
-rw-r--r--src/controls/TextField.qml2
5 files changed, 18 insertions, 4 deletions
diff --git a/src/controls/Private/TextHandle.qml b/src/controls/Private/TextHandle.qml
index 90fceced..3fc6256a 100644
--- a/src/controls/Private/TextHandle.qml
+++ b/src/controls/Private/TextHandle.qml
@@ -57,12 +57,18 @@ Loader {
property Item control
property QtObject styleData: QtObject {
+ id: styleData
+ signal activated()
readonly property alias pressed: mouse.pressed
readonly property alias position: handle.position
readonly property real lineHeight: position !== -1 ? editor.positionToRectangle(position).height
: editor.cursorRectangle.height
}
+ function activate() {
+ styleData.activated()
+ }
+
MouseArea {
id: mouse
anchors.fill: item
diff --git a/src/controls/Styles/Base/TextAreaStyle.qml b/src/controls/Styles/Base/TextAreaStyle.qml
index 301ac165..f6bceabc 100644
--- a/src/controls/Styles/Base/TextAreaStyle.qml
+++ b/src/controls/Styles/Base/TextAreaStyle.qml
@@ -104,9 +104,10 @@ ScrollViewStyle {
the cursor position. The interactive area is determined by the
geometry of the handle delegate.
- The following read-only properties are available within the scope
+ The following signals and read-only properties are available within the scope
of the handle delegate:
\table
+ \row \li \b {styleData.activated()} [signal] \li Emitted when the handle is activated ie. the editor is clicked.
\row \li \b {styleData.pressed} : bool \li Whether the handle is pressed.
\row \li \b {styleData.position} : int \li The character position of the handle.
\row \li \b {styleData.lineHeight} : real \li The height of the line the handle is on.
@@ -121,9 +122,10 @@ ScrollViewStyle {
the first selected character. The interactive area is determined
by the geometry of the handle delegate.
- The following read-only properties are available within the scope
+ The following signals and read-only properties are available within the scope
of the handle delegate:
\table
+ \row \li \b {styleData.activated()} [signal] \li Emitted when the handle is activated ie. the editor is clicked.
\row \li \b {styleData.pressed} : bool \li Whether the handle is pressed.
\row \li \b {styleData.position} : int \li The character position of the handle.
\row \li \b {styleData.lineHeight} : real \li The height of the line the handle is on.
diff --git a/src/controls/Styles/Base/TextFieldStyle.qml b/src/controls/Styles/Base/TextFieldStyle.qml
index f33d4876..13970867 100644
--- a/src/controls/Styles/Base/TextFieldStyle.qml
+++ b/src/controls/Styles/Base/TextFieldStyle.qml
@@ -162,9 +162,10 @@ Style {
the cursor position. The interactive area is determined by the
geometry of the handle delegate.
- The following read-only properties are available within the scope
+ The following signals and read-only properties are available within the scope
of the handle delegate:
\table
+ \row \li \b {styleData.activated()} [signal] \li Emitted when the handle is activated ie. the editor is clicked.
\row \li \b {styleData.pressed} : bool \li Whether the handle is pressed.
\row \li \b {styleData.position} : int \li The character position of the handle.
\row \li \b {styleData.lineHeight} : real \li The height of the line the handle is on.
@@ -179,9 +180,10 @@ Style {
the first selected character. The interactive area is determined
by the geometry of the handle delegate.
- The following read-only properties are available within the scope
+ The following signals and read-only properties are available within the scope
of the handle delegate:
\table
+ \row \li \b {styleData.activated()} [signal] \li Emitted when the handle is activated ie. the editor is clicked.
\row \li \b {styleData.pressed} : bool \li Whether the handle is pressed.
\row \li \b {styleData.position} : int \li The character position of the handle.
\row \li \b {styleData.lineHeight} : real \li The height of the line the handle is on.
diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml
index aa02cb14..d09b6d02 100644
--- a/src/controls/TextArea.qml
+++ b/src/controls/TextArea.qml
@@ -812,6 +812,8 @@ ScrollView {
if (!readOnly)
Qt.inputMethod.show()
}
+ cursorHandle.activate()
+ selectionHandle.activate()
}
function moveHandles(cursor, selection) {
diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml
index f25b8195..dfadd78d 100644
--- a/src/controls/TextField.qml
+++ b/src/controls/TextField.qml
@@ -672,6 +672,8 @@ Control {
if (!readOnly)
Qt.inputMethod.show()
}
+ cursorHandle.activate()
+ selectionHandle.activate()
}
function moveHandles(cursor, selection) {