[Qt-creator] How do I implement and register QmlDesigner::IWidgetPlugins?

Wingard, Alexander alexander.wingard at crosscontrol.com
Wed Nov 29 08:59:07 CET 2017


Hi,
I hope this is the correct place to ask this. Haven't had any real success googling.

I want to add some custom made QQuickItems to the QML Types panel in QmlDesigner. The purpose is to help our customers easily create UIs purely with the QmlDesigner, and minimize the need for coding knowledge as much as possible.

So far I've managed to create a QmlExtensionPlugin for my custom items that work fine in QmlDesigner. Only thing left to do is to get the components to show up in the QML Types panel so they can be easily dragged/dropped in.
>From what I understand I need to create a QmlDesigner::IWidgetPlugin for QtCreator that defines a category, button icons and labels (provide the metainfo file), and adds them to the QmlDesigner's ItemLibrary. The implementation of the class seems straight forward. But I'm having trouble finding out how to set up the plugin project itself.

Am I supposed to wrap this class inside a regular ExtensionSystem::IPlugin, or is it standalone?

Is there some opensource project or example available that implements IWidgetPlugin that I can look at? All I've found so far are the sources for the standard components inside the QtCreator source code, but those seem to be part of the QmlDesigner plugin itself and not easily understood.

And again, sorry if this is the wrong type of question for this list. If so, where do you recommend I ask these kinds of questions?

Would be very grateful for any help or pointers!

Thanks in advance,
Alex Wingård

Alexander Wingård
Software Developer
www.crosscontrol.com
<http://www.crosscontrol.com/>
CrossControl
making machines smart, safe and productive


________________________________

Actuant Corporation Email Notice

This message is intended only for the use of the Addressee and may contain information that is PRIVILEGED and/or CONFIDENTIAL.
This email is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this email is not an intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited.
If you have received this email in error, please notify the sender immediately by return mail and permanently delete the copy you received.

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20171129/beab3059/attachment.html>


More information about the Qt-creator mailing list