aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/texteditor
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-08-12 21:18:17 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-08-13 22:39:31 +0000
commiteecfe102073cadd9baaf02ec527d97a435186dba (patch)
treeac83bf172fec82989b33bb272ec6e46e6196410a /examples/quickcontrols2/texteditor
parent2c6cd0f7e0583243dd1d8438d6252e581e4e99f5 (diff)
texteditor: enable persistent selection
We want to keep the selection even if the editor loses focus when a color or font dialog is opened. The selected color or font should naturally apply to the whole text selection that was there before the dialog was opened. Change-Id: I76e6b95f979a090533b028be76e7b2cf1fd53e99 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'examples/quickcontrols2/texteditor')
-rw-r--r--examples/quickcontrols2/texteditor/qml/texteditor.qml1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/quickcontrols2/texteditor/qml/texteditor.qml b/examples/quickcontrols2/texteditor/qml/texteditor.qml
index 72b5da1a..db2a2afd 100644
--- a/examples/quickcontrols2/texteditor/qml/texteditor.qml
+++ b/examples/quickcontrols2/texteditor/qml/texteditor.qml
@@ -383,6 +383,7 @@ ApplicationWindow {
wrapMode: TextArea.Wrap
focus: true
selectByMouse: true
+ persistentSelection: true
// Different styles have different padding and background
// decorations, but since this editor is almost taking up the
// entire window, we don't need them.