QMLDesigner and QtDesktop components
I have trying to use QtDestop components within QtCreator's QMLDesigner.
When opening examples/TopLevel.qml, text is underlined when in edit mode for QtDesktop widgets and new properties.
And in edit mode, I get 'invalid property name shortcut' error message.
I am using Qt 4.8.2, QtCreator 2.5.0 that I recompiled both under MinGW.
On the other hand, it works fine either with qmlviewer or qmldesktopviewer.
I did install QtDesktop components using 'make install' and generating manually plugins.qmltypes using qmlplugindump.
I have been trying to dig onto QtCreator source code, it seems that QtDesktop dll is never loaded. Could it be an explanation of the error?
Could anybody plz help me to point what I forgot to be able to use QtDesktop components in design mode?
Thanks in advance.
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
The solution is to build share\qtcreator\qml\qmlpuppet in the Qt Creator source directory with a Qt version that supports the required components (in this case the QtDesktop components).
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. This is a generic solution to be able to render any component available in a specific Qt.
For the ‘invalid property name shortcut’ error message I have no immediate solution.
Thanks for your quick reply.
What do you mean by "a Qt version that supports the required components"? is it a Qt version where QtDesktop components are available from "imports" subfolder?
Anyway, I have been following your advice. I builded qmlpuppet from share\qtcreator\qml\qmlpuppet in the Qt Creator source directory, but it did not change anything.
I will try to get the latest Qt and QtCreator versions and let you know.
I tried Qt5 but could not compile QtCreator.
I think that I will have to stick with Qt 4.8. But I still have the problem.
Was anybody able to use QtDesktop components with QtCreator in design mode?
Any hint welcome.
I was able to use the QtDesktop components with QtCreator in designer mode.
I followed Thomas instructions with the qmlpuppet and then it worked.
I'm working with Qt 4.8.2 and Creator 2.5.1 and WinXP.
@Thomas: I would also be interested in what you mean by "a Qt version that supports the required components".
But I still have an other problem with the designer mode:
I created an own plugin following these instructions:
The components which included in my plugin are not shown in the designer preview of the qml file.
Does anybody know what i can do?
What is your secret to use QtDesktop components with QtCreator in designer mode?
I still can not preview TopLevel.qml from QtDesktop examples.
Does it work for you?
About your question did you try to use qmlplugindump ( as explained in http://doc.qt.nokia.com/qtcreator-2.3/creator-qml-modules-with-plugins.html)?