Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QTVirtualKeyboard InputMethod issue
Qt 6.11 is out! See what's new in the release blog

QTVirtualKeyboard InputMethod issue

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 3 Posters 3.7k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Khalid
    wrote on last edited by VRonin
    #1

    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();
     layout->addWidget(w1);
    
     QWidget* w = new QWidget;
     w->setLayout(layout);
     w->show();
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Khalid
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • Aleksey_KA Offline
          Aleksey_KA Offline
          Aleksey_K
          wrote on last edited by
          #4

          @Khalid said in QTVirtualKeyboard InputMethod issue:

          input method is not set

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

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved