QML extension plugin usage in the designer



  • Hello. I am trying to follow this example: http://doc.qt.io/qt-5/qtqml-tutorials-extending-qml-example.html.
    I am want to get the PieChart be able to get imported into a QML in the designer. I have created the qmltypes file for the chartsplugin.dll, as well as added the typeinfo in the qmldir file.
    Now when I open Qt Creator, qml file using the Charts 1.0 module does not puts red wiggles on the definitions, so the type importing seems to be working.
    When I switch to designer view of the app.qml file though I cannot see my drawing of the pie chart, only the top Item, although running the application shows it.
    I've also added the line designersupported to the qmldir file, but in the desgin view of my app.qml I cannot see the PieChart QQuickItem being drawn as in runtime.
    Is there anything I am missing?

    Thanks in advance.



  • I am going to respond to myself, as I finally got it working.

    The trick is having a good plugins.qmltypes file. Beware that qmlplugindump may not be dumping the correct information. Look for your dependencies in other qmltypes files and copy them from there or just mege the file with -merge argument. I think that qmlplugindump should be better documented, and also find it is buggy.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.