aboutsummaryrefslogtreecommitdiffstats
path: root/tests/testapplications
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2013-03-01 15:26:54 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-15 17:59:34 +0100
commit70ce4ec6ae9321a601a5af37d11bd284b2203bfc (patch)
treeecff50aa0266c8b2467e8ebe153f139a1ac2e869 /tests/testapplications
parent1366ad57bca2e45adfd624106602af6bf1f12044 (diff)
Add TextEdit::selectByKeyboard
The main use case is for enabling text selection by keyboard for read-only editors. Change-Id: Ieaa9af366fd0eaf863a104a2fdf33c9ddad38b10 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'tests/testapplications')
-rw-r--r--tests/testapplications/text/textedit.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/testapplications/text/textedit.qml b/tests/testapplications/text/textedit.qml
index 789a52894e..e0d7dbdde4 100644
--- a/tests/testapplications/text/textedit.qml
+++ b/tests/testapplications/text/textedit.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import QtQuick 2.0
+import QtQuick 2.1
Rectangle {
height: 360; width: 640
@@ -75,6 +75,7 @@ Rectangle {
wrapMode: { wrapvalue.model.get(wrapvalue.currentIndex).value }
smooth: { smoothvalue.model.get(smoothvalue.currentIndex).value }
selectByMouse: { mousevalue.model.get(mousevalue.currentIndex).value }
+ selectByKeyboard: { keyboardvalue.model.get(keyboardvalue.currentIndex).value }
onLinkActivated: { bordercolor.border.color = "red" }
Rectangle { id: bordercolor; color: "transparent"; border.color: "green"; anchors.fill: parent }
}
@@ -228,6 +229,10 @@ Rectangle {
controlname: "Mouse"
model: ListModel { ListElement { name: "Off"; value: false } ListElement { name: "On"; value: true } } }
ControlView {
+ id: keyboardvalue
+ controlname: "Keyboard"
+ model: ListModel { ListElement { name: "Off"; value: false } ListElement { name: "On"; value: true } } }
+ ControlView {
id: halignvalue
controlname: "HAlign"
model: ListModel { ListElement { name: "Left"; value: Text.AlignLeft } ListElement { name: "Right"; value: Text.AlignRight }