how can add qtVirtualKeyboard to QLineEdit
-
Check the docs https://doc.qt.io/qt-5/qtvirtualkeyboard-index.html and make sure your platform is supported.
-
@isan said in how can add qtVirtualKeyboard to QLineEdit:
but I want to know how can add QML to qlineEdit,Is it possible?
What has QML to do with QLineEdit?
If you follow the docs, QtVirtualKeyboard will show up for all text inputs in your application, including QLineEdit.
-
@sierdzio I follow this link the doc is difficult to understand , I follow the
Using Qt Virtual Keyboard with Qt Wayland for see the output of example
and
when I runQT_XCB_GL_INTEGRATION=xcb_egl QT_WAYLAND_CLIENT_BUFFER_INTEGRATION=xcomposite-egl QT_IM_MODULE=qtvirtualkeyboard ./pure-qml -platform xcb
output is:
qt.qpa.screen: QXcbConnection: Could not connect to display Could not connect to any X display.
On the guide says
qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); In the desktop integration method, this step is all that is required to use Qt Virtual Keyboard. In the application integration method, the application is required to create an instance of InputPanel as explained in the following chapter.
So I need just add this line to my QT widget project and create input panel for use the keyboard?
-
@isan said in how can add qtVirtualKeyboard to QLineEdit:
So I need just add this line to my QT widget project and create input panel for use the keyboard?
As far as I understand, just the
qputenv
should be enough. -
@isan said in how can add qtVirtualKeyboard to QLineEdit:
@sierdzio I just add this line to main.cpp but keyboard not opening, should be add qml source file of keyboard to qt widget project?
I don't know, sorry.