Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Is it possible to write a custom keyboard driver without using Qt's plugin system?
Forum Updated to NodeBB v4.3 + New Features

Is it possible to write a custom keyboard driver without using Qt's plugin system?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 2 Posters 796 Views 1 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.
  • F Offline
    F Offline
    FrozenTarzan
    wrote on last edited by
    #1

    Qt version: Qt for embedded 4.8.6

    Accoriding to Qt for Embedded Linux Character Input I have used the "LinuxInput" keyboard driver in my embedded device by setting the QWS_KEYBOARD environment variable:

    export QWS_KEYBOARD="LinuxInput:/dev/input/event0"
    

    Now I would like to create my own input driver and register it but I don't want to touch the Qt directory itself to register my plugins. I would also prefer a solution where I don't have to build a separate library with its own project file.

    Is it somehow possible to simply inherit from QWSKeyboardHandler and QKbdDriverPlugin and register this code so that Qt can find/load my driver? I would like to place all my code within my application project. I'm afraid that this might not be possible according to How to Create Qt Plugins but maybe that's just because it is usually done like this to be write "portable" plugins?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      From memory and IIRC, Qt's plugin loader will look in several places between the application folder and the installation folder, thus I guess you should be able to get it working.

      Otherwise, you can also use QCoreApplication::addLibaryPath to give add additional folders to search from. However, I don't know whether you have to follow the same folder structure to find a given plugin type. In any case, it's likely a good idea to have it that way.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      F 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        From memory and IIRC, Qt's plugin loader will look in several places between the application folder and the installation folder, thus I guess you should be able to get it working.

        Otherwise, you can also use QCoreApplication::addLibaryPath to give add additional folders to search from. However, I don't know whether you have to follow the same folder structure to find a given plugin type. In any case, it's likely a good idea to have it that way.

        F Offline
        F Offline
        FrozenTarzan
        wrote on last edited by
        #3

        @SGaist Thanks for the input. Qt is looking for plugins at several places, I found someone who tried to explain a few common pitfalls in One hundred reasons my Qt plugin is not working.

        But my main question is if Qt is only looking for *.so files? So I thought Qt is looking for already built plugins created by their own *.pro file. Do you suggest to simply try to copy the plugin source files into the directories?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @FrozenTarzan said in Is it possible to write a custom keyboard driver without using Qt's plugin system?:

          @SGaist Thanks for the input. Qt is looking for plugins at several places, I found someone who tried to explain a few common pitfalls in One hundred reasons my Qt plugin is not working.

          But my main question is if Qt is only looking for *.so files? So I thought Qt is looking for already built plugins created by their own *.pro file. Do you suggest to simply try to copy the plugin source files into the directories?

          No, never did I. You have to build the plugin. What I was saying is that you should not need to put it in your Qt installation plugin folders.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          F 1 Reply Last reply
          0
          • SGaistS SGaist

            @FrozenTarzan said in Is it possible to write a custom keyboard driver without using Qt's plugin system?:

            @SGaist Thanks for the input. Qt is looking for plugins at several places, I found someone who tried to explain a few common pitfalls in One hundred reasons my Qt plugin is not working.

            But my main question is if Qt is only looking for *.so files? So I thought Qt is looking for already built plugins created by their own *.pro file. Do you suggest to simply try to copy the plugin source files into the directories?

            No, never did I. You have to build the plugin. What I was saying is that you should not need to put it in your Qt installation plugin folders.

            F Offline
            F Offline
            FrozenTarzan
            wrote on last edited by
            #5

            @SGaist Ah, ok. Thanks! I mark this one as solved.

            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