Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QT_IM_MODULE doesn't work for me



  • I tried to set custom input method(virtual keyboard) but QT_IM_MODULE doesn't work for me.

    I downloaded

    http://tolszak-dev.blogspot.com/2013/04/qplatforminputcontext-and-virtual.html

    virtual keyboard example, compiled it and succesfully installed in my system but when i set

    QT_IM_MODULE=mockup and start simple Qt app i does not work. Do you know why?

    Plugin is loaded correctly:

    Trying... "./plugins/libMockupVirtualKeyboard.so"
    Found metadata in lib ./plugins/libMockupVirtualKeyboard.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface",
    "MetaData": {
    "Keys": [
    "mockup"
    ]
    },
    "className": "MockupPlatformInputContextPlugin",
    "debug": true,
    "version": 329216
    }


  • Moderators

    @sibislaw45
    How exactly have you set the QT_IM_MODULE env variable?

    is the posted output from a set QT_DEBUG_PLUGINS env variable? To me it seems like you are trying to load the plugin manually by yourself? If this is the case you should rather put the plugin into the platforminputcontexts sub-folder of your Qt plugins path.



  • How exactly have you set the QT_IM_MODULE env variable?

    QT_IM_MODULE=mockup ./PluginTest

    (PluginTest is basic widgets app created from qt creator).

    is the posted output from a set QT_DEBUG_PLUGINS env variable? YES

    Plugin is in platforminputcontexts sub-folder


  • Moderators

    @sibislaw45
    i am asking becasue the first line of your posted output says it tries to load from the plugins folder directly:

    Trying... "./plugins/libMockupVirtualKeyboard.so"
    


  • Yes, sorry but now is:

    QFactoryLoader::QFactoryLoader() looking at "/home/s.busza/Qt5/5.6/gcc_64/plugins/platforminputcontexts/libmockupvirtualkeyboard.so"
    Found metadata in lib /home/s.busza/Qt5/5.6/gcc_64/plugins/platforminputcontexts/libmockupvirtualkeyboard.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface",
    "MetaData": {
    "Keys": [
    "mockup"
    ]
    },
    "className": "MockupPlatformInputContextPlugin",
    "debug": true,
    "version": 329216
    }

    Got keys from plugin meta data ()

    the keys is empty, i see



  • I have had a similar issue. I was actually trying both QtVirtualKeyboard (for Qt12.5.1) and Mockup to get an idea how these work, and what I would need to modify for my needs. What I discovered is that the QtVirtualKeyboard had an interface of "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1" , while mockup had an interface of "org.qt-project.Qt.QPlatformInputContextFactoryInterface". My guess is that at some point the interface was reved, and Mockup is now a too old interface. Why I adjust Mockup to match QtVirtualKeyboard, it worked.
    As a side note, when I run designer, neither shows up in the plugins dialog, even they are active (as proven by checking the filter box).


Log in to reply