Qt World Summit: Register Today!

QTVirtualKeyboard InputMethod issue

  • i am loading the keyboard.qml in QQuickView and then add it to a widget, but when I click on any key i got a warning input method is not set.
    I looked at the documentation and it did not show how to create a custom input method, I want to override the keyEvent and write my logic there.

     QQuickView view(QString("qrc:/QtQuick/VirtualKeyboard/content/components/Keyboard.qml"));
     if (view.status() == QQuickView::Error)
     return -1;
     view.setResizeMode(QQuickView::SizeRootObjectToVie w);
     QHBoxLayout *layout = new QHBoxLayout();
     QWidget* w = new QWidget;

  • Lifetime Qt Champion


    WARNING: I haven't used that module yet.

    Quickly taking a look at the example from the module, did you add qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); before creating the QApplication object in your main.cpp ?

    Hope it helps.

  • Yes I already did, what I am trying to achieve is to create my own custom method so when I receive the keys events I can forward it to a specific instances.

  • @Khalid said in QTVirtualKeyboard InputMethod issue:

    input method is not set

    Solution here: https://forum.qt.io/post/594648

Log in to reply