Qt Android下
显示和隐藏原生的
输入法分别是 Qt.inputMethod.show()和Qt.inputMethod.hide()
```
TextEdit{
id:
textEdit text: qsTr("输入一些文字")
font.family: "microsoft yahei"
font.pixelSize: dpH*15
height: dpH*24
width: parent.width -
button.width
horizontalAlignment: Text.AlignHCenter
selectByKeyboard: true
selectByMouse: true
onVisibleChanged: {
if (visible){
Qt.inputMethod.show()
}else{
Qt.inputMethod.hide()
}
isClicked = visible
}
onActiveFocusOnPressChanged: {
if (activeFocus){
Qt.inputMethod.show()
isClicked = true;
}
}
}
```
需要完整代码请访问
QtAndroidExamples