[Development] Problems with QmlEngine and importPath
Stephen Kelly
stephen.kelly at kdab.com
Tue Aug 28 10:34:36 CEST 2012
On Tuesday, August 28, 2012 09:42:58 Wehmer, Matthias wrote:
> Hi everybody,
>
> we are currently suffering from the following problem: We fail to change the
> default directory for our custom qml plugins, that we have written in C++,
> and that we want to import (e.g. via import custom_plugin 1.0). That is the
> only directory our QML applications find the plugins is in the default
> import directory from the Qt5 directory. What is also strange is that the
> Qt Creator recognizes our plugin (i.e. the syntax highlighting works) in an
> arbitrary directory as long as the QML_IMPORT_PATH is set.
>
> We are using Qt5 with the angle project and the Qt Creator.
>
> That is what we've tried so far:
>
> 1. changing the QML_IMPORT_PATH: although this results in syntax
> highlighting in the Qt Creator, our application still doesn't find the
> plugins 2. using QmlEngine::addImportPath( dest ) : the path is in the
> importPathList now, we've checked that, but the plugins can't be found
> anyway 3. varying the qmldir files: doesn't work either
>
> Is this a known problem or is there an error in our application?
> Thank you in advance for your help.
>
Interesting. If this is broken, maybe that's why QtSensors installs its plugin
to the wrong location:
https://bugreports.qt-project.org/browse/QTBUG-26860
(That bug should be re-opened)
If addImportPath is broken, it should be fixed, and QtSensors should use it.
Thanks,
--
Stephen Kelly <stephen.kelly at kdab.com> | Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120828/5dfe2b74/attachment.sig>
More information about the Development
mailing list