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. Custom widget plugin not shown on plugins list
Forum Updated to NodeBB v4.3 + New Features

Custom widget plugin not shown on plugins list

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 3 Posters 556 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
    Dragoon
    wrote on 15 Feb 2023, 13:15 last edited by Dragoon
    #1

    Hallo, I'm trying to create my first widget and a corrisponding plugin.
    I followed official tutorials and some other sources and I finally managed to compile everything correctly, the widget works fine... When I try to open the 'About plugins' window in Qt Creator I got this error (in terminal window):

    qt.core.plugin.loader: In /opt/Qt/Tools/QtCreator/lib/Qt/plugins/designer/libvirtualpadplugin.so:
      Plugin uses incompatible Qt library (5.15.0) [debug]
    

    Of course my widget is not shown in QtCreator widget palette.

    I'm using Qt 5.15.2 , Qt Creator 9.0.0 under Linux 20.04.
    Qt have been installed trough official Qt online installer.

    bye by[t]e{s}... Mike

    S 1 Reply Last reply 15 Feb 2023, 19:31
    0
    • D Dragoon
      15 Feb 2023, 13:15

      Hallo, I'm trying to create my first widget and a corrisponding plugin.
      I followed official tutorials and some other sources and I finally managed to compile everything correctly, the widget works fine... When I try to open the 'About plugins' window in Qt Creator I got this error (in terminal window):

      qt.core.plugin.loader: In /opt/Qt/Tools/QtCreator/lib/Qt/plugins/designer/libvirtualpadplugin.so:
        Plugin uses incompatible Qt library (5.15.0) [debug]
      

      Of course my widget is not shown in QtCreator widget palette.

      I'm using Qt 5.15.2 , Qt Creator 9.0.0 under Linux 20.04.
      Qt have been installed trough official Qt online installer.

      S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 15 Feb 2023, 19:31 last edited by
      #2

      Hi,

      You should check which version of Qt was used to build Qt Creator. That's the one you need to use to build your plugin.

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

      D 2 Replies Last reply 15 Feb 2023, 20:24
      1
      • S SGaist
        15 Feb 2023, 19:31

        Hi,

        You should check which version of Qt was used to build Qt Creator. That's the one you need to use to build your plugin.

        D Offline
        D Offline
        Dragoon
        wrote on 15 Feb 2023, 20:24 last edited by
        #3

        @SGaist I cannot update Qt... can I downgrade Qt Creator? Which version of Qt Creator is based on Qt 5.15.2 (if any)?

        bye by[t]e{s}... Mike

        S D 2 Replies Last reply 15 Feb 2023, 20:28
        0
        • D Dragoon
          15 Feb 2023, 20:24

          @SGaist I cannot update Qt... can I downgrade Qt Creator? Which version of Qt Creator is based on Qt 5.15.2 (if any)?

          S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 15 Feb 2023, 20:28 last edited by
          #4

          You can download the specific Qt Creator installer.

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

          D 1 Reply Last reply 17 Feb 2023, 11:22
          0
          • D Dragoon
            15 Feb 2023, 20:24

            @SGaist I cannot update Qt... can I downgrade Qt Creator? Which version of Qt Creator is based on Qt 5.15.2 (if any)?

            D Offline
            D Offline
            Dragoon
            wrote on 16 Feb 2023, 07:46 last edited by
            #5

            @Dragoon uhm... where I can find the version matching table?
            Qt Creator 9.00 -> Qt 6.40
            Qt Creator 4.11 -> Qt 5.12.8
            Qt Creator ?.?? -> Qt 5.15.2

            Hope there's a version matrix somewhere ....

            bye by[t]e{s}... Mike

            J 1 Reply Last reply 16 Feb 2023, 07:56
            0
            • D Dragoon
              16 Feb 2023, 07:46

              @Dragoon uhm... where I can find the version matching table?
              Qt Creator 9.00 -> Qt 6.40
              Qt Creator 4.11 -> Qt 5.12.8
              Qt Creator ?.?? -> Qt 5.15.2

              Hope there's a version matrix somewhere ....

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 16 Feb 2023, 07:56 last edited by
              #6

              @Dragoon In QtCreator: "Help/About QtCreator...".

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              D 1 Reply Last reply 16 Feb 2023, 08:41
              0
              • J jsulm
                16 Feb 2023, 07:56

                @Dragoon In QtCreator: "Help/About QtCreator...".

                D Offline
                D Offline
                Dragoon
                wrote on 16 Feb 2023, 08:41 last edited by Dragoon
                #7

                @jsulm that's not what I asked. I meant... is there a compatibility matrix that tells which Qt Creator version is based on a specific Qt version? Of course the answer could be NOT (not nice but I will appreaciate the honesty).

                As I stated Qt Creator 9.0.0 is based upon Qt 6.4
                Qt Creator 4.11.0 is based on Qt 5.12.8
                Qt Creator 4.5.2 is baed on Qt 5.9.5

                ... at the moment I didn't found a version of Qt Creator based on Qt 5.15.2 and that means that plugins produced with Qt 5.15.2 are not usable.
                Hope the only way to find this information is NOT to install each version of Qt Creator available and look into the About dialog box... (waste of time apart this could also ends with: none found).

                bye by[t]e{s}... Mike

                J 1 Reply Last reply 16 Feb 2023, 08:47
                0
                • D Dragoon
                  16 Feb 2023, 08:41

                  @jsulm that's not what I asked. I meant... is there a compatibility matrix that tells which Qt Creator version is based on a specific Qt version? Of course the answer could be NOT (not nice but I will appreaciate the honesty).

                  As I stated Qt Creator 9.0.0 is based upon Qt 6.4
                  Qt Creator 4.11.0 is based on Qt 5.12.8
                  Qt Creator 4.5.2 is baed on Qt 5.9.5

                  ... at the moment I didn't found a version of Qt Creator based on Qt 5.15.2 and that means that plugins produced with Qt 5.15.2 are not usable.
                  Hope the only way to find this information is NOT to install each version of Qt Creator available and look into the About dialog box... (waste of time apart this could also ends with: none found).

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 16 Feb 2023, 08:47 last edited by
                  #8

                  @Dragoon Why don't you simply use Qt version which was used to build your version of QtCreator? Why does it have to be Qt 5.15.2?

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  D 1 Reply Last reply 16 Feb 2023, 13:01
                  0
                  • J jsulm
                    16 Feb 2023, 08:47

                    @Dragoon Why don't you simply use Qt version which was used to build your version of QtCreator? Why does it have to be Qt 5.15.2?

                    D Offline
                    D Offline
                    Dragoon
                    wrote on 16 Feb 2023, 13:01 last edited by
                    #9

                    @jsulm being 'backaward' compatible with Qt 5.15.2 is a mandatory requirement.

                    bye by[t]e{s}... Mike

                    1 Reply Last reply
                    0
                    • S SGaist
                      15 Feb 2023, 19:31

                      Hi,

                      You should check which version of Qt was used to build Qt Creator. That's the one you need to use to build your plugin.

                      D Offline
                      D Offline
                      Dragoon
                      wrote on 16 Feb 2023, 13:04 last edited by Dragoon
                      #10

                      @SGaist I managed to compile the plugin under Qt 6.4.0 and then installed it inside

                      /opt/Qt/Tools/QtCreator/lib/Qt/plugins/designer/
                      

                      But when I open QtCreator 9.0.0 (based on Qt 6.4.0) plugins window I still got this:

                      Plugin uses incompatible Qt library (5.15.0) [debug]
                      

                      As an interesting sidenote this's qtplugininfo output:

                      qtplugininfo: libvirtualpadplugin.so: No plug-in meta-data found: The shared library was not found.
                      

                      Moreover if the qtplugininfo is run when the plugin is copied into plugin folder than the error become:

                      IID "org.qt-project.Qt.QDesignerCustomWidgetInterface" Qt 5.15.0 (debug)
                      qtplugininfo: /opt/Qt/5.15.2/gcc_64/plugins/designer/libvirtualpadplugin.so: invalid metadata, user data is not a JSON object
                      

                      bye by[t]e{s}... Mike

                      1 Reply Last reply
                      0
                      • S SGaist
                        15 Feb 2023, 20:28

                        You can download the specific Qt Creator installer.

                        D Offline
                        D Offline
                        Dragoon
                        wrote on 17 Feb 2023, 11:22 last edited by Dragoon
                        #11

                        @SGaist I finally managed to make it work. I needed to downgrade the Qt version to 5.12.8 making a standard system wide installation on Ubuntu (trough apt of course).
                        Then I compiled the plugin and placed it into:

                        /usr/lib/x86_64-linux-gnu/qt5/plugins/designer/
                        

                        This works fine but I have a minor issue that's very annoying.
                        I would like to change the name of the widget in designer pallette from QTVirtualPad to Virtual Pad .
                        Changing plugin name() return value will disrupt everything so this's not the way... but every standard Qt component shows a name different to that of its class so it should be possibile... but how?

                        09d65ced-c737-491c-91c5-780d5fcbb49a-image.png

                        bye by[t]e{s}... Mike

                        D 1 Reply Last reply 17 Feb 2023, 12:49
                        0
                        • D Dragoon
                          17 Feb 2023, 11:22

                          @SGaist I finally managed to make it work. I needed to downgrade the Qt version to 5.12.8 making a standard system wide installation on Ubuntu (trough apt of course).
                          Then I compiled the plugin and placed it into:

                          /usr/lib/x86_64-linux-gnu/qt5/plugins/designer/
                          

                          This works fine but I have a minor issue that's very annoying.
                          I would like to change the name of the widget in designer pallette from QTVirtualPad to Virtual Pad .
                          Changing plugin name() return value will disrupt everything so this's not the way... but every standard Qt component shows a name different to that of its class so it should be possibile... but how?

                          09d65ced-c737-491c-91c5-780d5fcbb49a-image.png

                          D Offline
                          D Offline
                          Dragoon
                          wrote on 17 Feb 2023, 12:49 last edited by
                          #12

                          @Dragoon I found a way to fix the name of the widget in Qt Creator palette: it's needed to add (or modify if already present) the tag displayname provided in the most external node of xml element returned by plugin's domXml() method.
                          In my code :

                          QString VirtualPadPlugin::domXml() const {
                            return "<ui language=\"c++\" displayname=\"Virtual Pad\">\n"
                          ...
                          

                          bye by[t]e{s}... Mike

                          1 Reply Last reply
                          0
                          • D Dragoon has marked this topic as solved on 10 Mar 2023, 08:42

                          1/12

                          15 Feb 2023, 13:15

                          • Login

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