Are you sure the directory name should start with a slash? In general I believe a correct qmldir file and the plugin together should resolve the problem in Creator.
Are you sure the directory name should start with a slash? In general I believe a correct qmldir file and the plugin together should resolve the problem in Creator.
So I think the plugin itself is ok because I am able to access its properties. There's also no way I am by-passing the QPluginLoader section either because without it the application fails to load.
So there must be something wrong with either the qmldir file or perhaps its no even being read?
It must be sufficient since the qdeclarativemodules simply says I need, plugin <Name> [<Path>] which you can see from above I have that (I removed the slash, it didn't change anything).
Therefore QtCreator can't be reading it in the first place. So is what I've done correct? The plugin is not in the application directory. So I set the QML_IMPORT_PATH. By then attempting to import BasicComponents I'm then expecting QtCreator to look through all the import paths, appending the BasicComponents to the paths, then if there's a correct directory, then look for a qmldir file in that directory. Is that how the process works or have I gotten it wrong![]()
Unfortunately I don't know such details. You'd have to look in Qt Creator source code to verify that. Also see if qmlviewer can detect your plugin using the qmldir file. If it works, Creator should detect it as well.
Hi again,
So I tried to load a qml file which contains a reference to the plugin and it doesn't work. What's more annoying is that when I edit the file with QtCreator its happy with the type!
I've now copied the example found at http://qt.nokia.com/developer/learni...-quick-edition, downloaded the examples under the "Integrating QML with C++" heading and added the qml-cpp-integration/ex-extension-plugin to my project. I then build the project and try to load the standalone/ellipse9s.qml using the qmlviewer and again I get an error!
Qt Code:
file:///C:/Qt/myExamples/CppQmlProject/Src/Components/Elipse/standalone/ellipse9s.qml:8:5: Ellipse is not a type Ellipse { ^To copy to clipboard, switch view to plain text mode
Has anyone managed to get this example working?
I've tried opening the file directly (open the viewer, then file, navigate to ellipse9s, open ellipse9s) and also from the command line with a -I to add the import path:
Qt Code:
qmlviewer -I qml-cpp-integration/ex-extension-plugin/standalone qml-cpp-integration/ex-extension-plugin/standalone/ellipse9s.qmlTo copy to clipboard, switch view to plain text mode
One thing to remember. Qt Creator is by default built against MSVC and Qt apps and probably your plugin as well is built against MinGW, so Creator might not be able to load it.
I managed to get everything working by downloading the SDK and then following the steps mentioned here:http://developer.qt.nokia.com/forums/viewthread/5267
(when I opened qmldump.pro QtCreator instantly highlighted the missing headers)
Anyways I don't usually use the SDK and I tried to use the same fix for QtCreator, but it didn't appear to work - perhaps its the issue wysota mention,
Haven't had time to look into this properly yet, but thanks for the suggestion!Qt Creator is by default built against MSVC and Qt apps and probably your plugin as well is built against MinGW, so Creator might not be able to load it.
Bookmarks