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. Plugin is not loading automatically
Forum Update on Monday, May 27th 2025

Plugin is not loading automatically

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 412 Views
  • 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.
  • G Offline
    G Offline
    Guy Gizmo
    wrote on 15 May 2023, 17:54 last edited by
    #1

    I'm developing a plugin based off of the TuioTouch generic plugin that comes standard in Qt. My plugin does a similar task of reading in data from a device and converting them into Qt touches.

    The plugin works fine, but so far I can't get it to load automatically. I definitely have it installed in the correct place for Qt to find it. Even so, it only ever loads if I launch the app with a command line argument that explicitly enables it, like:
    ./myApp -plugin myPluginName

    Is there something else I need to do to get it to load without using a command line argument?

    S 1 Reply Last reply 15 May 2023, 18:34
    0
    • G Guy Gizmo
      15 May 2023, 19:27

      @SGaist said in Plugin is not loading automatically:

      Hi,

      Qt's plugin do not get all auto loaded at runtime. There usually a reason for that like adding a new database connection will load the corresponding plugin at that time.

      What exact type of plugin are building ?

      As far as I know, it's a generic plugin, in that it goes into the plugins/generic directory and inherits from QGenericPlugin, if that answers the question. I'm still new to plugins so a) I don't know if there's a more specific answer to your question, and b) I don't know if this is the right class to inherit from.

      I'm imitating what was done in the TuioTouch plugin that comes with Qt, since I figured that was a good starting point. My plugin does almost the same thing, except rather than receiving touches from a TUIO server and converting them to Qt touch events, it receives touches using a third party API I'm working with.

      S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 15 May 2023, 19:42 last edited by
      #4

      That's what I wanted to know.

      One thing you can do is make use of the ˋQT_QPA_GENERIC_PLUGINS` environment variable to load your plugin.

      If it's mandatory for your application, you can set that variable in your main function before creating the QApplication object.

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

      G 1 Reply Last reply 15 May 2023, 19:54
      0
      • G Guy Gizmo
        15 May 2023, 17:54

        I'm developing a plugin based off of the TuioTouch generic plugin that comes standard in Qt. My plugin does a similar task of reading in data from a device and converting them into Qt touches.

        The plugin works fine, but so far I can't get it to load automatically. I definitely have it installed in the correct place for Qt to find it. Even so, it only ever loads if I launch the app with a command line argument that explicitly enables it, like:
        ./myApp -plugin myPluginName

        Is there something else I need to do to get it to load without using a command line argument?

        S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 15 May 2023, 18:34 last edited by
        #2

        Hi,

        Qt's plugin do not get all auto loaded at runtime. There usually a reason for that like adding a new database connection will load the corresponding plugin at that time.

        What exact type of plugin are building ?

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

        G 1 Reply Last reply 15 May 2023, 19:27
        0
        • S SGaist
          15 May 2023, 18:34

          Hi,

          Qt's plugin do not get all auto loaded at runtime. There usually a reason for that like adding a new database connection will load the corresponding plugin at that time.

          What exact type of plugin are building ?

          G Offline
          G Offline
          Guy Gizmo
          wrote on 15 May 2023, 19:27 last edited by
          #3

          @SGaist said in Plugin is not loading automatically:

          Hi,

          Qt's plugin do not get all auto loaded at runtime. There usually a reason for that like adding a new database connection will load the corresponding plugin at that time.

          What exact type of plugin are building ?

          As far as I know, it's a generic plugin, in that it goes into the plugins/generic directory and inherits from QGenericPlugin, if that answers the question. I'm still new to plugins so a) I don't know if there's a more specific answer to your question, and b) I don't know if this is the right class to inherit from.

          I'm imitating what was done in the TuioTouch plugin that comes with Qt, since I figured that was a good starting point. My plugin does almost the same thing, except rather than receiving touches from a TUIO server and converting them to Qt touch events, it receives touches using a third party API I'm working with.

          S 1 Reply Last reply 15 May 2023, 19:42
          0
          • G Guy Gizmo
            15 May 2023, 19:27

            @SGaist said in Plugin is not loading automatically:

            Hi,

            Qt's plugin do not get all auto loaded at runtime. There usually a reason for that like adding a new database connection will load the corresponding plugin at that time.

            What exact type of plugin are building ?

            As far as I know, it's a generic plugin, in that it goes into the plugins/generic directory and inherits from QGenericPlugin, if that answers the question. I'm still new to plugins so a) I don't know if there's a more specific answer to your question, and b) I don't know if this is the right class to inherit from.

            I'm imitating what was done in the TuioTouch plugin that comes with Qt, since I figured that was a good starting point. My plugin does almost the same thing, except rather than receiving touches from a TUIO server and converting them to Qt touch events, it receives touches using a third party API I'm working with.

            S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 15 May 2023, 19:42 last edited by
            #4

            That's what I wanted to know.

            One thing you can do is make use of the ˋQT_QPA_GENERIC_PLUGINS` environment variable to load your plugin.

            If it's mandatory for your application, you can set that variable in your main function before creating the QApplication object.

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

            G 1 Reply Last reply 15 May 2023, 19:54
            0
            • S SGaist
              15 May 2023, 19:42

              That's what I wanted to know.

              One thing you can do is make use of the ˋQT_QPA_GENERIC_PLUGINS` environment variable to load your plugin.

              If it's mandatory for your application, you can set that variable in your main function before creating the QApplication object.

              G Offline
              G Offline
              Guy Gizmo
              wrote on 15 May 2023, 19:54 last edited by
              #5

              @SGaist said in Plugin is not loading automatically:

              That's what I wanted to know.

              One thing you can do is make use of the ˋQT_QPA_GENERIC_PLUGINS` environment variable to load your plugin.

              If it's mandatory for your application, you can set that variable in your main function before creating the QApplication object.

              Thanks!

              Can you say whether there's a better type of plugin for me to use for this?

              S 1 Reply Last reply 15 May 2023, 21:04
              0
              • G Guy Gizmo
                15 May 2023, 19:54

                @SGaist said in Plugin is not loading automatically:

                That's what I wanted to know.

                One thing you can do is make use of the ˋQT_QPA_GENERIC_PLUGINS` environment variable to load your plugin.

                If it's mandatory for your application, you can set that variable in your main function before creating the QApplication object.

                Thanks!

                Can you say whether there's a better type of plugin for me to use for this?

                S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 15 May 2023, 21:04 last edited by
                #6

                @Guy-Gizmo i think you selected the right one.

                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
                0
                • G Guy Gizmo has marked this topic as solved on 15 May 2023, 21:11
                • G Guy Gizmo referenced this topic on 17 May 2023, 20:07

                1/6

                15 May 2023, 17:54

                • Login

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