How to launch QtQuick UI project with plugin?
-
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 pluginTARGET = $$qtLibraryTarget($$TARGET)
uri = com.purefractalsolutions.gkdroid.newsethelperInput
SOURCES +=
newsethelperPlugin.cpp
newsethelper.cppHEADERS +=
newsethelperPlugin.h
newsethelper.hOTHER_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 KitKit 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
@