PDA

View Full Version : Qt.inputMethod.show () doesn't show any keyboard



TheIndependentAquarius
23rd February 2015, 10:45
Considering:


TextInput and TextEdit's openSoftwareInputPanel() and closeSoftwareInputPanel() methods have been removed. Use the new Qt.inputMethod property and call Qt.inputMethod.show() Qt.inputMethod.hide() to show and hide the virtual keyboard.

from: http://doc.qt.io/qt-5/qtquick-porting-qt5.html


import QtQuick 2.3
import QtQuick.Window 2.2

Window
{
id: root
visible: true
width: 600
height: 557

Rectangle
{
id: numberInputBox
height: 500
width: 300
border.color: "green"

TextInput
{
id: textInput
font.pixelSize: 20
cursorVisible: true
height: 500
width: 300

MouseArea
{
anchors.fill: parent
onClicked:
{
Qt.inputMethod.show()
console.log("getPrinted")
}
}
}
}

}

The text from console.log gets printed but I cannot see any keyboard on screen.