PDA

View Full Version : how to enable tab key as input in textArea if it is on a tab



nagyjano
11th May 2016, 13:24
Hi,

I am new to Qt and qml.
I want to write a simple code editor.
My problem is that if I use TextArea on a Tab than its no longer processes tab key as an input but rather it just switch focus to the "next" qml object.
Here is a simple sample code.


Window {
visible: true

TabView
{
id: tmptv
anchors.fill: parent
Tab {
id: tmptab
title: "tmp1"
active: true
sourceComponent: TextArea {
anchors.fill: parent
}
}
}
}

I think the problem is about that the tab key input somehow not propagated toward TextArea instead it is processed by the Tab.
Any suggestion how to make it possible to accept tab key in this case as input for code editing?
Thanks in advance!

anda_skoa
13th May 2016, 10:46
Very strange behavior indeed, could be a bug in TextArea.

But it works with TextEdit.

Cheers,
_