Nominate our 2022 Qt Champions!

(Windows) QT Quick 1 Extention plugin

  • I'm new to QT and am having trouble getting my plugin installed and visible to my main project. I have not changed anything with the plugin projects, as I just wanted to get it hooked up correctly before development.

    I have been following the following examples, which are straight forward.

    My main app is a "QT Quick Application". There is no code in my toolbar class.

    When i add
    import CISPlugin 1.0 to my main.qml, I get the following message in 'General Messages'.

    bq. QML module does not contain information about components contained in plugins.

    Module path: C:/development/QTCommon/qgisBase/MainUI/CISPlugins
    See "Using QML Modules with Plugins" in the documentation.

    Automatic type dump of QML module failed.
    "C:\OSGeo4W64\bin\qmlplugindumpd.exe" returned exit code 3.
    Arguments: -relocatable CISPlugins 1.0 C:/development/QTCommon/qgisBase/MainUI
    QDeclarativeComponent: Component is not ready
    "file:///C:/development/QTCommon/qgisBase/MainUI/typelist.qml:2:1: module "CISPlugins" plugin "CISPlugins" not found"

    Any help would be great in getting this setup.

    @plugin CISPlugins@


    #include <QDeclarativeExtensionPlugin>

    class CISPluginsPlugin : public QDeclarativeExtensionPlugin
    #if QT_VERSION >= 0x050000
    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")

    void registerTypes(const char *uri);


    #include "cisplugins_plugin.h"
    #include "toolbar.h"

    #include <qdeclarative.h>

    void CISPluginsPlugin::registerTypes(const char *uri)
    // @uri
    qmlRegisterType<Toolbar>(uri, 1, 0, "Toolbar");

    #if QT_VERSION < 0x050000
    Q_EXPORT_PLUGIN2(CISPlugins, CISPluginsPlugin)

Log in to reply