From cd5fc3ea02bea45dc81dd33d555cf9d1265f9d3a Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 21 Jul 2017 05:48:53 +0200 Subject: Editor focus --- framework/qml/TextEditor.qml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'framework') diff --git a/framework/qml/TextEditor.qml b/framework/qml/TextEditor.qml index d80bebb9..97aa56d2 100644 --- a/framework/qml/TextEditor.qml +++ b/framework/qml/TextEditor.qml @@ -22,21 +22,23 @@ import QtQuick.Controls 2.2 import org.kube.framework 1.0 as Kube -Kube.ScrollHelper { - id: scrollHelper +FocusScope { property alias text: edit.text - flickable: root - Flickable { - id: root + Kube.ScrollHelper { anchors.fill: parent - ScrollBar.vertical: ScrollBar {} - - Kube.TextArea { - id: edit + flickable: flickableItem + Flickable { + id: flickableItem anchors.fill: parent - selectByMouse: true - wrapMode: TextEdit.Wrap + ScrollBar.vertical: ScrollBar {} + + Kube.TextArea { + id: edit + anchors.fill: parent + selectByMouse: true + wrapMode: TextEdit.Wrap + } + TextArea.flickable: edit } - TextArea.flickable: edit } } -- cgit v1.2.3