开发者

show keyboard on focus qml

I'm trying to show the keyboard when the view loads and the TextInput has focus.

TextInput {
  id: textInput
  focus: true
}

I thought the keyboard would show up automatically since the text input has focus. But it doesn't.

So I tried sending this event to the view, but it doesn't show the keyboard on the first load. Please note that I'm loading this qml dynamically using a QML Loader on the first load. The subsequent loads of this view, shows the keyboard as expected.

QE开发者_如何学Govent event(QEvent::RequestSoftwareInputPanel);
bool sent = QApplication::sendEvent(iView, &event);


See this discussion. virtual keyboard does not appear in QML-based application on Nokia 5230

Try to bring the software input panel with the use of Component.onLoaded:{ }.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜