QtQuick Extras is not appearing not appearing in QML Designer Canvas



  • Hello friends,
    I am trying to use QtQuick.Extras 1.4. But QML Designer canvas shows blank rectangles.
    I found the below messages in WinDbg:
    QuickDesigner: Cannot create an object of type "QtQuick.Extras/DelayButton 1,0" - type isn't known to declarative meta type system
    QuickDesigner: Cannot create an object of type "QtQuick.Extras/CircularGauge 1,0" - type isn't known to declarative meta type system

    I am also facing same issues with my custom controls.
    Any help is appreciated.



  • Please have a look here: http://doc.qt.io/qtcreator/creator-qml-modules-with-plugins.html

    Running QML Modules in Qt Quick Designer

    The QtQuick Extras are not part of Qt Creator in your case. Therefore you have to build the qmlpuppet for the Qt you use.
    Custom QML plugins that are build with that Qt should work then, too.



  • @ThomasHartmann Thanks for the suggestions. Can you please explain how to build qmlpuppet for qtquick.extra / mycustomcontrols ? I found two projects qmlpuppet and qml2puppet inside qt-creator/src/tools.



  • The puppet is build automatically for the configured Kit (if it is a desktop kit) once you enable the setting in the options.
    Options/QtQuick/QtQuick Designer/Emulation Layer/Use QML emulation layer which is built by selected Qt.

    By default, a fallback emulation layer is provided by Qt Creator and built with the same Qt version as Qt Creator. Therefore, your QML modules will mostly not work out of the box.

    To use an emulation layer that is built with the Qt configured in the build and run kit for the project, select Tools > Options > Qt Quick > Qt Quick Designer > Use QML emulation layer which is built by the selected Qt radio button. Qt Creator builds the emulation layer when you select the Design mode.



  • I just tried the latest Qt 5.5 release an the Qt Creator that comes with this release. At least on Windows the QtQuick.Extras work out of the box. If you use an older Qt Creator the Extras are not part of Qt Creator and you have to build the qml2puppet as described above.

    For your own components which use C++ you should always build the qml2puppet.



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