Hi all,

I am trying to make the QtVirtualKeyboard example work with QQuickWidget instead of QQuickView. For QuickView, I use the following main.cpp code, which works fine for me:

Qt Code:
  1. #include <QQuickView>
  2. #include <QGuiApplication>
  3. #include <QQmlEngine>
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7. qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
  8.  
  9. QGuiApplication app(argc, argv);
  10.  
  11. QQuickView view(QString("qrc:/%2").arg(MAIN_QML));
  12. view.setResizeMode(QQuickView::SizeRootObjectToView);
  13. view.show();
  14.  
  15. return app.exec();
  16. }
To copy to clipboard, switch view to plain text mode 

I run into problems, when changing to QQuickWidgets with the following implementation of main.cpp:

Qt Code:
  1. #include <QQuickWidget>
  2. #include <QApplication>
  3. #include <QQmlEngine>
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7. qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
  8.  
  9. QApplication app(argc, argv);
  10.  
  11. QQuickWidget w(QString("qrc:/%2").arg(MAIN_QML));
  12. w.setResizeMode(QQuickWidget::SizeRootObjectToView);
  13. w.show();
  14.  
  15. return app.exec();
  16. }
To copy to clipboard, switch view to plain text mode 

When I hit the input fields, the virtual keyboard shows up, but when I start typing at the keyboard, I get the message "input method is not set", which seems to be related to the input method plugin. No chars appear in the input fields.
Any ideas? The QML-code didn't change between the above variants of main.cpp

BTW: I am using Linux, gcc, Qt 5.9.0, EGLFS plugin

Thanks for any suggestions!

Regards,
Patrick