Reputation: 235
I have a StackView
. In that I open a SplitView
. The SplitView
contains two parts. In one part I have a TextField
.
When I open the SplitView
the focus shall be put on the TextField
.
I tried many things: focus:true
or forceActiveFocus()
. I have no ideas anymore. Maybe someone could give me a hint.
Upvotes: 0
Views: 87
Reputation: 235
The solution is pretty simple:
Component.onCompleted: {
Qt.callLater(correctFocus)
}
function correctFocus () {
callTextField.forceActiveFocus();
}
Upvotes: 0