Custom QML-Components with Designer integration
i wrote a QtQuick-Plugin for drawing graphical-primitives like a Ellipse or a Line.
It works well, but the Designer doesn’t recognize my custom plugin (C++; Dll).
I want to create a QML Component which is as comfortable to use as the Qt built-in Components e.g. Rectangle, MouseArea, etc.
Is there a way to create such Components in my Custom Dll?
How does it work?
Does anybody have the same problem?
I found somebody having the same problem like me, but there is no solution… :-/
Can anybody help?
Qt Quick Designer uses an external process called qmlpuppet to render components.
By default a qmlpuppet shipped together with Qt Creator is used. This one does not support
your custom components.
The solution is to build share\qtcreator\qml\qmlpuppet in the Qt Creator source directory with a Qt version that supports the required components. You also have to install your custom components for this Qt version (in the imports directory).
Building qmlpuppet will install an executable for rendering components in the /bin directory of the Qt building it.
Qt Quick Designer checks for the Qt of the current project if a qmlpuppet is in the /bin directory. If yes it takes the qmlpuppet provided by the Qt version instead of the one provided by Qt Creator itself.
thank you for your advice.
This works fine for the qt-components-desktop, but not for the qt-components-symbian and not for my own QtQuickPlugin.
I’m not sure, but I think there are some things missing in my QtQuickPlugin.
The elements in my Plugin are derived from QDeclarativeItem and they get drawn with the Paint signal.
This works fine in the running mode, but i can’t see anything in the Designer.
Do you know a “HowTo” to create a QtQuickPlugin like the qt-components-desktop is?
Hi, after some discussed, I still consider that it is a bug in subcomponentmanager.cpp (yeah, please refer to the link). You may try to compile your own QtCreator to solve this issue temporally.
this [qt-project.org] one, too. Not exactly a solution, but might help.Try looking at