Important: Please read the Qt Code of Conduct -

Input method plugin for Qt5 not working

  • Hi my friends.
    I have a input plugin named "" inside ...../plugins/platforminputcontexts" (Linux) and if i run a Qt5 program it not activate this plugin after a "export QT_IM_MODULE=gcin". This directory is right because if i run a Qt5 program after "export QT_IM_MODULE=vkim" it will activate another input method called "vkim". If vkim-plugin not is in this directory, "vkim" input system also will not work. So this, bring me to the question : why is not working "gcin"-plugin ?
    "gcin" main interface is written inside header "gcin-qt5.h", his interface is :

    #include <QtGui/qpa/qplatforminputcontextplugin_p.h>
    #include <QtCore/QStringList>
    #include "qgcinplatforminputcontext.h"
    class QGcinPlatformInputContextPlugin : public QPlatformInputContextPlugin
        Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1" FILE "gcin.json")
        QStringList keys() const;
        QGcinPlatformInputContext *create(const QString& system, const QStringList& paramList);

    Somebody undestand about input contexts and can help me ?
    Can be some another type of problem ?
    Inside code of "keys()" and "create(...)" y write a QMessageBox::information(0,0,"...") but it never write nothing after :

    export QT_IM_MODULE=gcin

    Thanks for any help.


  • Hi

    export QT_DEBUG_PLUGINS=1

    i discover where is a problem. Qt can not found a library which depend on this plugin.
    I resolve it partially copying this "*.so" to a same folder as a executable.
    Better would be to know, which environment variable need to set in order Qt can found it, or to know where Qt go to search this library.
    greatings, Daniel

  • Lifetime Qt Champion


    LD_LIBRARY_PATH is probably what you are looking for

  • Hi SGaist.
    I will give it a try. May be on .profile file or something else set this environment variable.
    For the time, i simple copy this *.so file to installation folder of Qt :
    and it works, except for "designer", but i never use it.
    Thanks for you idea.

  • Now i tried with

    export LD_LIBRARY_PATH ...

    ... and it works (open designer). So i fill simply set this variable at begin of my system.
    Thanks. Daniel

  • Hi
    This is interesting, because i have 2 different places in which i install Qt, one in /opt in another in /home/daniel, some programs refere to one library place (/home/daniel/Qt/5.5/gcc_64/lib) and "designer" refere to /opt/Qt/5.5/gcc_64/lib.
    I not need to set LD_LIBRARY_PATH.
    After copy this one file to /opt/Qt/5.5/gcc_64/lib, "designer" also works.

Log in to reply