Qt Designer plugins failed to load meta data
-
wrote on 10 Jun 2022, 13:07 last edited by
Hi folks,
I am trying to load the designer plugin of this project to the Qt Designer widget in the Qt Creator:
https://github.com/Skycoder42/QPathEditHowever I was not able to load it, it fails with Failed to extract plugin metadata from 'plugin.so'
Here is what I tried: compiled the QtCreator's built in Designer test plugin (File new project - Other project - Qt Custom Designer Widget) with Qt 6.3.0, and it gives the same result.
I also tried to build this project:
https://gitlab.com/mattbas/Qt-Color-Widgets
but it fails the same way. -
Hi,
This is just a wild guess but I wonder if the empty json data might be the culprit.
I would try test a default plugin project and if everything goes well start from there.
-
wrote on 13 Jun 2022, 06:54 last edited by
Many thanks for your answer @SGaist!
It looks that we are entering into a deep rabbit hole :D
The example designer plugin project shipped with QtCreator does not have a json at all.The Analog Clock designer plugin example:
https://doc.qt.io/qt-6/qtdesigner-customwidgetplugin-example.htmlThe documentation lists a json file in the pro file, but it does not have at git:
https://code.qt.io/cgit/qt/qttools.git/tree/examples/designer/customwidgetplugin?h=6.3Do you know if the same json format applies like the QtCreator plugins:
https://doc.qt.io/qtcreator-extending/plugin-meta-data.html -
That's why I have suggested to check the "Qt Creator Plugin" project template just in case.
Designer is older than Qt Creator .
-
wrote on 8 Jul 2022, 03:21 last edited by
@martonmiklos did you end up resolving this? I am getting the same error, loading the AnalogClockWidget from the Qt 6.2 Examples directory. As you mentioned, the .pro file for the example references a .json file, but it's not referenced from the code anywhere, and no .json file exists in the examples directory. However, trying to load the widget into QtCreater results the error:-
Failed to extract plugin meta data from '$HOME/Qt/Tools/QtCreator/lib/Qt/plugins/designer/libcustomwidgetplugin.so' -
@martonmiklos did you end up resolving this? I am getting the same error, loading the AnalogClockWidget from the Qt 6.2 Examples directory. As you mentioned, the .pro file for the example references a .json file, but it's not referenced from the code anywhere, and no .json file exists in the examples directory. However, trying to load the widget into QtCreater results the error:-
Failed to extract plugin meta data from '$HOME/Qt/Tools/QtCreator/lib/Qt/plugins/designer/libcustomwidgetplugin.so'wrote on 8 Jul 2022, 07:45 last edited by@SGaist I've just created a plugin through QtCreator based on Qt 6.3.1 using the template. Complete all fields in the templete, and build the template plugin. When loading into the designer plugins path, QtCreator generates the same error the OP was experiencing? Is there something else that needs to be defined to build the plugins on Linux, it seems inconsitent that even the supplied samples don't load?
-
@SGaist I've just created a plugin through QtCreator based on Qt 6.3.1 using the template. Complete all fields in the templete, and build the template plugin. When loading into the designer plugins path, QtCreator generates the same error the OP was experiencing? Is there something else that needs to be defined to build the plugins on Linux, it seems inconsitent that even the supplied samples don't load?
@GSConsulting Hi and welcome to devnet,
Might be a silly question but did you use the same version of Qt that was used to build Qt Creator ?
-
wrote on 10 Jul 2022, 21:13 last edited by
Hi and thanks. I've installed QtCreator as part of the Qt binaries with the live Qt installer. How do I find out which version of Qt it was built with?
I have tried the plugin on 3 different versions of creator. 5.15 which is the default debian package for Ubuntu. 5.35 and 6.2.1, both installed with the live Qt installer. However, in all cases I have no idea which version of Qt the creator was built with. I'll check that when I get to work this morning.
Cheers.
-
Hi and thanks. I've installed QtCreator as part of the Qt binaries with the live Qt installer. How do I find out which version of Qt it was built with?
I have tried the plugin on 3 different versions of creator. 5.15 which is the default debian package for Ubuntu. 5.35 and 6.2.1, both installed with the live Qt installer. However, in all cases I have no idea which version of Qt the creator was built with. I'll check that when I get to work this morning.
Cheers.
wrote on 10 Jul 2022, 21:22 last edited by@GSConsulting Help > About from Creator.
-
wrote on 13 Jul 2022, 23:06 last edited by
Thanks heaps for the quick replies @SGaist and @JonB, turns out the version of creator shipped with Qt6.3 is built on Qt6.2.3. Recompiling the plugins with 6.2.3 does in fact fix the problem. This does raise the question for me, as to how one would go about making a plugin for distribution obviously not knowing which version of QtCreator the consumer of said plugin is going to have. But I'm not up to that yet, so I'll leave that conundrum for another day.
-
Are you thinking Linux distribution ?