Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Input method plugin for Qt5 not working
Forum Updated to NodeBB v4.3 + New Features

Input method plugin for Qt5 not working

Scheduled Pinned Locked Moved General and Desktop
pluginqplatforminputc
6 Posts 2 Posters 2.8k 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.
  • D Offline
    D Offline
    Daniel T
    wrote on last edited by
    #1

    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
    0
    • D Offline
      D Offline
      Daniel T
      wrote on last edited by
      #2

      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
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        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
        1
        • D Offline
          D Offline
          Daniel T
          wrote on last edited by
          #4

          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
          0
          • D Offline
            D Offline
            Daniel T
            wrote on last edited by
            #5

            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
            0
            • D Offline
              D Offline
              Daniel T
              wrote on last edited by
              #6

              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
              0

              • Login

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