Commit 22f77d49 authored by John Brooks's avatar John Brooks Committed by Jens Bache-Wiig
Browse files

Add a tabChangesFocus property to TextArea for KeyNavigation behavior


Merge-request: 4
Reviewed-by: default avatarJens Bache-Wiig <jens.bache-wiig@nokia.com>
parent 140aa0d8
No related merge requests found
Showing with 5 additions and 0 deletions
......@@ -12,6 +12,7 @@ ScrollArea {
property alias text: edit.text
property alias wrapMode: edit.wrapMode
property alias readOnly: edit.readOnly
property bool tabChangesFocus: false
highlightOnFocus: true
property int documentMargins: 4
......@@ -36,6 +37,10 @@ ScrollArea {
colorGroup: enabled ? SystemPalette.Active : SystemPalette.Disabled
}
KeyNavigation.priority: KeyNavigation.BeforeItem
KeyNavigation.tab: area.tabChangesFocus ? area.KeyNavigation.tab : null
KeyNavigation.backtab: area.tabChangesFocus ? area.KeyNavigation.backtab : null
onPaintedSizeChanged: {
area.contentWidth = paintedWidth + (2 * documentMargins)
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment