[Qt-qml] Components, loaders, and focus scope
Girish Ramakrishnan
girish at forwardbias.in
Thu Dec 16 15:43:56 CET 2010
Hi Mathias,
On Thu, Dec 16, 2010 at 7:43 PM, <mathias.malmqvist at nokia.com> wrote:
8< snipped
> TextInput {
> width: 200
> height: 20
> Rectangle { color: parent.activeFocus ? "green" : "red"; anchors.fill: parent; z: -1 }
>
> activeFocusOnPress: false
> MouseArea { anchors.fill: parent; onClicked: parent.focus = true }
> }
Try parent.forceActiveFocus() instead above.
Girish
More information about the Qt-qml
mailing list