Solved QVirtualKeyboard on widget-based application on Raspberry pi3
-
Hi,
I'm trying to understand why the VirtualKeyboard is not working on raspberry pi 3 (running with boot2qt Qt5.12.0) using a widget-based application BUT working with the Qt Quick Virtual Keyboard - Basic Example .
Is there a difference between QML and Widget plugin?In my widget-based application I've the following (work if I compile it on my PC with gcc-64bits)
in .pro file I just add
QT += core gui virtualkeyboard CONFIG += disable-desktop
in main.cpp
int main(int argc, char *argv[]) { qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); }
in mainwindow.cpp
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { QLineEdit *mLineEdit = new QLineEdit(this); setCentralWidget(mLineEdit); }
-
Hi,
Did you try to run your application with the
QT_DEBUG_PLUGINS
environment set to 1 ? That should give you some additional clues about what is happening. -
Hi SGaist,
Thank you I've try the QT_DEBUG_PLUGIN but the virtual keyboard one seems to be properly loaded.
I found a similar post : https://forum.qt.io/topic/75129/virtual-keyboard-does-not-show-up-in-qwidgets-app-on-rpi-2
The conclusion is that QVirtualKeyboard doesn't work with EGLFS. It is necessary to add QML part. Very bad! I never used QML -
Can somebody give me a quick example of QML using QQuickWidget?
Thank you
-