Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Input method plugin for Qt5 not working

    General and Desktop
    plugin qplatforminputc
    2
    6
    2382
    Loading More Posts
    • 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.
    • D
      Daniel T last edited by

      Hi my friends.
      I have a input plugin named "libgcinplatforminputcontextplugin.so" 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_OBJECT
      public:
          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
      ./some_qt5_program
      

      Thanks for any help.

      Daniel

      1 Reply Last reply Reply Quote 0
      • D
        Daniel T last edited by

        Hi
        Using

        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

        1 Reply Last reply Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi,

          LD_LIBRARY_PATH is probably what you are looking for

          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 Reply Quote 1
          • D
            Daniel T last edited by

            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 :
            /home/daniel/Qt/5.5/gcc_64
            and it works, except for "designer", but i never use it.
            Thanks for you idea.
            Daniel

            1 Reply Last reply Reply Quote 0
            • D
              Daniel T last edited by

              Now i tried with

              export LD_LIBRARY_PATH ...
              designer
              

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

              1 Reply Last reply Reply Quote 0
              • D
                Daniel T last edited by

                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.
                Daniel

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post