Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
Description
Working with QML plugins should now be easier. Simply set up the import path (importPaths in .qmlproject or QML_IMPORT_PATH in .pro) and import the plugin in your QML file.
Creator will try to find the library and extract type information from the plugins referenced in the qmldir file. If all goes well, the editor will now recognize the library's types and offer correct code completion.
What Creator is doing is
1. Build 'qmldump', a tool to load a QML plugin and dump all the metainfo Creator needs to stdout.
2. Run qmldump on the plugin.
3. Parse the output and inject it into the code model.
Unfortunately, there are several points of failure: First off, building qmldump needs Qt's private headers, so if you're using an install of Qt that doesn't have them and doesn't ship a precompiled qmldump, you're out of luck. Running qmldump can also fail, for instance if the plugin's and qmldump's Qt version don't match or the plugin fails to load because it expects a specific environment.
To avoid these problems, plugin developers can run qmldump manually and ship the output with their plugin. If there's a library.xml file next to the qmldir file, Creator will load it instead of running qmldump itself.
http://labs.qt.nokia.com/2010/11/30/new-qml-editor-features/