Using plugin in UI QML project.



  • There is a plugin cwQuickQt.Controls made in Visual Studio - a DLL file.
    Importing cwQuickQt.Controls in a project is done successfully => the plugins.qmltypes is read in, no red underline. But the plugin type GraphicsApplicationWindow is underlined as Uknown component (M300).
    I need to enter Designer section in Qt Creator 3.3.1, but it shows a dialog saying that there is an uknown component and when I click Ok or Ignore the Qt Creator crashes.

    Why Qt Creator does not recognize a component and why it crashes?

    I created the qmldir file =>

    @module cwQuickQt.Controls
    plugin cwQuickQtControls
    classname QuickQt
    typeinfo plugins.qmltypes@

    and generated plugins.qmltypes via qmlplugindump (Qt 5.4) =>

    E:\Win32\bin>qmlplugindump.exe cwQuickQt.Controls 1.0 E:\Win32\bin\qml > E:\Win32\bin\qml\cwQuickQt\Controls\plugins.qmltypes

    Output

    @GraphicsWindowQtQ::initialize(): no traits were specified. Creating window with
    default settings...
    This plugin does not support propagateSizeHints()
    This plugin does not support propagateSizeHints()
    This plugin does not support propagateSizeHints()
    import QtQuick.tooling 1.1

    // This file describes the plugin-supplied types contained in the library.
    // It is used for QML tooling purposes only.
    //
    // This file was auto-generated by:
    // 'qmlplugindump.exe cwQuickQt.Controls 1.0 E:\Win32\bin\qml'

    Module {
    Component {
    prototype: "QObject"
    name: "cwQuickQt.Controls/GraphicsApplicationWindow"
    exports: ["GraphicsApplicationWindow 1.0"]
    exportMetaObjectRevisions: [0]
    isComposite: true
    defaultProperty: "data"
    Property { name: "menuBar"; type: "MenuBar_QMLTYPE_4"; isPointer: true }

        Property { name: "toolBar"; type: "QQuickItem"; isPointer: true }
        Property { name: "statusBar"; type: "QQuickItem"; isPointer: true }
        Property { name: "style"; type: "QQmlComponent"; isPointer: true }
        Property { name: "__topBottomMargins"; type: "double" }
        Property { name: "__qwindowsize_max"; type: "double"; isReadonly: true }
    
        Property { name: "__width"; type: "double" }
        Property { name: "__height"; type: "double" }
        Property { name: "contentItem"; type: "ContentItem_QMLTYPE_2"; isReadonl
    

    y: true; isPointer: true }
    Property { name: "__style"; type: "QObject"; isReadonly: true; isPointer
    : true }
    Property { name: "__panel"; type: "QObject"; isReadonly: true; isPointer
    : true }
    Property { name: "data"; type: "QObject"; isList: true; isReadonly: true
    }
    Signal {
    name: "postRender"
    Parameter { name: "painter"; type: "QPainter"; isPointer: true }
    }
    Signal { name: "multiSampleRequestDone" }
    Method { name: "update" }
    Method {
    name: "updateLater"
    Parameter { name: "force"; type: "bool" }
    }
    Method { name: "updateLater" }
    Property { name: "color"; type: "QColor" }
    Property {
    name: "activeFocusItem"
    revision: 1
    type: "QQuickItem"
    isReadonly: true
    isPointer: true
    }
    Signal { name: "frameSwapped" }
    Signal {
    name: "openglContextCreated"
    revision: 2
    Parameter { name: "context"; type: "QOpenGLContext"; isPointer: true
    }
    }
    Signal { name: "sceneGraphInitialized" }
    Signal { name: "sceneGraphInvalidated" }
    Signal { name: "beforeSynchronizing" }
    Signal { name: "afterSynchronizing"; revision: 2 }
    Signal { name: "beforeRendering" }
    Signal { name: "afterRendering" }
    Signal { name: "afterAnimating"; revision: 2 }
    Signal { name: "sceneGraphAboutToStop"; revision: 2 }
    Signal {
    name: "closing"
    revision: 1
    Parameter { name: "close"; type: "QQuickCloseEvent"; isPointer: true
    }
    }
    Signal {
    name: "colorChanged"
    Parameter { type: "QColor" }
    }
    Signal {
    name: "sceneGraphError"
    revision: 2
    Parameter { name: "error"; type: "QQuickWindow::SceneGraphError" }
    Parameter { name: "message"; type: "string" }
    }
    Method { name: "releaseResources" }
    Property { name: "title"; type: "string" }
    Property { name: "modality"; type: "Qt::WindowModality" }
    Property { name: "flags"; type: "Qt::WindowFlags" }
    Property { name: "x"; type: "int" }
    Property { name: "y"; type: "int" }
    Property { name: "width"; type: "int" }
    Property { name: "height"; type: "int" }
    Property { name: "minimumWidth"; type: "int" }
    Property { name: "minimumHeight"; type: "int" }
    Property { name: "maximumWidth"; type: "int" }
    Property { name: "maximumHeight"; type: "int" }
    Property { name: "visible"; type: "bool" }
    Property { name: "active"; revision: 1; type: "bool"; isReadonly: true }

        Property { name: "visibility"; revision: 1; type: "Visibility" }
        Property { name: "contentOrientation"; type: "Qt::ScreenOrientation" }
        Property { name: "opacity"; revision: 1; type: "double" }
    }
    

    }@



  • if the lines before import QtQuick.tooling 1.1 are really outputted in the file (instead of stderr) then that breaks the file, as it is invalid qml syntax, try deleting them and submit a bug about it (errors are probably redirected to the wrong place)



  • No, it's an output into the terminal. As I mentioned in the question, the plugins.qmltypes was successfully read in by Qt Creator.


Log in to reply
 

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