summaryrefslogtreecommitdiff
path: root/src/controls/TextArea.qml
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2014-07-23 11:33:48 +0200
committerRichard Moe Gustavsen <richard.gustavsen@digia.com>2014-09-23 17:46:07 +0200
commit229c4b0a71c888c37fad054c2fabaecfa3ba73fc (patch)
treedce058ff2feab69504056150848783ad785afbbc /src/controls/TextArea.qml
parent26db5c724540449ef1e19178427081bff084e4ad (diff)
downloadqtquickcontrols-229c4b0a71c888c37fad054c2fabaecfa3ba73fc.tar.gz
Add EditMenu to input controls
Add EditMenu to TextArea, TextField, ComboBox and SpinBox. Change-Id: Ic2fed55c467dde65334006d252f4052430f3f40c Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/controls/TextArea.qml')
-rw-r--r--src/controls/TextArea.qml20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml
index 1f06569c..d8181ab9 100644
--- a/src/controls/TextArea.qml
+++ b/src/controls/TextArea.qml
@@ -436,6 +436,16 @@ ScrollView {
readonly property alias hoveredLink: edit.hoveredLink
/*!
+ \qmlproperty Menu TextArea::menu
+ \since QtQuick.Controls 1.3
+
+ This property contains the edit menu for working
+ with text selection. Set it to \c null if no menu
+ is wanted.
+ */
+ property Menu menu: editMenu.defaultMenu
+
+ /*!
\qmlmethod TextArea::append(string)
Appends \a string as a new line to the end of the text area.
@@ -849,6 +859,16 @@ ScrollView {
}
}
+ EditMenu {
+ id: editMenu
+ control: area
+ input: edit
+ cursorHandle: cursorHandle
+ selectionHandle: selectionHandle
+ flickable: flickable
+ anchors.fill: parent
+ }
+
TextHandle {
id: selectionHandle