Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to launch QtQuick UI project with plugin?
Forum Updated to NodeBB v4.3 + New Features

How to launch QtQuick UI project with plugin?

Scheduled Pinned Locked Moved Qt Creator and other tools
1 Posts 1 Posters 810 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tramvon
    wrote on last edited by
    #1

    I have lib project which was built in source directory (shadow build disabled). MinGW toolset used (Windows 7)

    qmldir file:
    @
    module com.purefractalsolutions.gkdroid.newsethelper
    plugin newsethelper plugins
    @

    plugin main module:
    @
    #include "newsethelperPlugin.h"
    #include "newsethelper.h"
    #include <QtDeclarative/qdeclarative.h>

    void NewSetHelperPlugin::registerTypes(const char *uri)
    {
    qmlRegisterType<NewSetHelper>(uri, 1, 0, "NewSetHelper");
    }
    @

    .pro file

    @TEMPLATE = lib
    TARGET = newsethelper
    QT += qml quick declarative
    CONFIG += qt plugin

    TARGET = $$qtLibraryTarget($$TARGET)
    uri = com.purefractalsolutions.gkdroid.newsethelper

    Input

    SOURCES +=
    newsethelperPlugin.cpp
    newsethelper.cpp

    HEADERS +=
    newsethelperPlugin.h
    newsethelper.h

    OTHER_FILES = qmldir

    !equals(PRO_FILE_PWD, $$OUT_PWD) {
    copy_qmldir.target = $$OUT_PWD/qmldir
    copy_qmldir.depends = $$PRO_FILE_PWD/qmldir
    copy_qmldir.commands = $(COPY_FILE) "$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)" "$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)"
    QMAKE_EXTRA_TARGETS += copy_qmldir
    PRE_TARGETDEPS += $$copy_qmldir.target
    }

    qmldir.files = qmldir
    unix {
    installPath = $$[QT_INSTALL_QML]/$$replace(uri, \., /)
    qmldir.path = $$installPath
    target.path = $$installPath
    INSTALLS += target qmldir
    }
    @

    UI Project file (gkdroidui.qmlproject)
    @
    /* File generated by Qt Creator, version 2.7.0 */

    import QmlProject 1.1

    Project {
    mainFile: "./gkdroid/main.qml"

    /* Include .qml, .js, and image files from current directory and subdirectories */
    QmlFiles {
        directory: "."
    }
    JavaScriptFiles {
        directory: "."
    }
    ImageFiles {
        directory: "."
    }
    /* List of plugin directories passed to QML runtime */
    // importPaths: [ "../exampleplugin" ]
    // importPaths { directory: "." }
    importPaths: [ "." ]
    

    }
    @

    When I try to run UI project, I have the error:
    @module "com.purefractalsolutions.gkdroid.newsethelper" is not installed@

    which points to next qml statement:

    @import com.purefractalsolutions.gkdroid.newsethelper 1.0@

    Also, the qmlscene executable used by QtCreator is D:\Qt\5.3\msvc2013\bin\qmlscene.exe and sometime something errors occurs.

    I try to change UI project run toolset (Kit), but got an error

    @---------------------------
    Incompatible Kit

    Kit Desktop Qt 5.3 MSVC2013 32bit is incompatible with kit Desktop Qt 5.3.0 MinGW 32bit.

    OK
    ---------------------------@

    What I'm doing wrong?

    Update

    "Incomatible Kit" problem solved by not changing current but adding new kit and removing previous.

    Running
    @D:\Qt\5.3\mingw482_32\bin\qmlplugindump.exe -relocatable NewSetHelper 1.0 F:/work/app/ext@

    tells
    @
    QQmlComponent: Component is not ready
    file:///F:/work/app/ext/typelist.qml:2:1: module "NewSetHelper" is not installed
    @

    dependency walker tells that next files can'be found:
    @
    API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL
    API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
    API-MS-WIN-CORE-WINRT-L1-1-0.DLL
    API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
    API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
    API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL
    DCOMP.DLL
    GPSVC.DLL
    IESHIMS.DLL
    @

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved