In which directory Qt search plugins ?



  • Hi.
    I have a input-plugin (platforminputcontext) which in Qt4 version work , but not for Qt5 programs.
    Can i ask ... ? : If i make click in a QLineEdit, in a Qt5 program, in which directories it will search for a input method plugin ?
    It search for directory QT_PLUGIN_PLATH ?
    I work with Linux. Thanks for any help.
    Daniel


  • Moderators

    Hi @Daniel-T,

    Call QCoreApplication::libraryPaths() to discover your root search paths.

    Qt looks for the "platforms" subdirectory to find your platform plugin. On Linux, the default is the XCB plugin: <RootSearchPath>/platforms/libqxcb.so. The platform input context is loaded by the platform plugin, in the "platforminputcontexts" subdirectory.

    Also see this article about input methods: http://www.kdab.com/qt-input-method-depth/



  • Hi JKSH
    At main, a.libraryPaths() show me 2 directories : One is finished with .../plugins (is this correct ?) and another is the folder in which i create a compiled program. I dont know if it is correct .../plugins, but works with vkimplatforminputcontextplugin. Im am trying to get working my mainly used system, which is gcin (libgcinplatforminputcontextplugin.so) but without success with Qt5 programs. It only works for Qt4, but at forum say the recent version of libgcinplatforminputcontextplugin.so works with Qt5 (adding .5.1 to a line). This is important for me and a try to found a way. In this last 3 weeks i use already many hours for get working gcin, and it is a problem for me already many years. If it is necessary i will try to make a modified version of this plugin. I have gcin source code. I also spended time with "vkim" but i already have success with it.
    Case is libvkimplatforminputcontextplugin.so must be in same directory as libgcinplatforminputcontextplugin.so and it need to be found same. Daniel



  • About what i understand about used plugins :
    In time i make a click in a QLineEdit, it call Qt Platform Abstraction, so there it will have a role XCB plugin, which is inside <RSP>/platforms. This will look for input method plugins inside <RSP>/platforminputcontexts. It will try to load a plugin ...
    I dont know : exist a way to know, if it have success to load libgcinplatforminputcontextplugin.so, and also a way to know later if it really load "gcin" or not ? Thanks for any help. Daniel


  • Moderators

    @Daniel-T said:

    About what i understand about used plugins :
    In time i make a click in a QLineEdit, it call Qt Platform Abstraction, so there it will have a role XCB plugin, which is inside <RSP>/platforms. This will look for input method plugins inside <RSP>/platforminputcontexts. It will try to load a plugin ...

    Yes, that is correct.

    works with vkimplatforminputcontextplugin. Im am trying to get working my mainly used system, which is gcin (libgcinplatforminputcontextplugin.so) but without success with Qt5 programs. It only works for Qt4.

    1. From where did you get libgcinplatforminputcontextplugin.so?
    2. Did you build the plugin yourself?

    To find out if the Qt 5 is supported, you should ask the author of the GCIN plugin. (Note: This plugin is not created by the Qt Project, so we don't know if it is supported or not)

    @Daniel-T said:

    I dont know : exist a way to know, if it have success to load libgcinplatforminputcontextplugin.so, and also a way to know later if it really load "gcin" or not ?

    Sorry, I don't know.

    You can subscribe to the Interest mailing list and ask a Qt engineer.



  • Thanks for all your help.

    1. I did get libgcinplatforminputcontextplugin.so from Arch Linux, and author is Elius from internet page
      hyperrate. I also give questions to him, using chinese (i am spanish people).
    2. I not build the plugin by my self.

    But i have his source code, which i can download from previously commented link.
    Qt5 is supported, it have a qt5-immodule, but one week previously it not work with Qt5.5. I found this error in another webpage, in which commented that we must add ".5.1." (from Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface" FILE "gcin.json") to Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1" FILE "gcin.json"). He correct but only give a compiled version in ArchLinux last 11 of september which i suppose must work for my system also.
    But may be i will give a try to compile it by my self for have all control about it, because it is very strange that vkim work but not gcin.
    Also, if i am able to compile by my way, i also can check if gcin-plugin is loaded or not with success and check where is it a problem. Thanks for all. Daniel


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.