blob: f68a8901aba5c43123ed26b4ccaf78c8074b8fb1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import QtQuick 2.0
Rectangle {
width: 200
height: 200
FocusScope {
id: focusScope
anchors.fill: parent
TextInput {
anchors.centerIn: parent
text: "Some text"
onActiveFocusChanged: if (!activeFocus) focusScope.focus = false
Component.onCompleted: forceActiveFocus()
}
}
}
|