1.
ldd reports failure in locating my library file as well
...Plugin is loaded dynamically, because of this the linker will not find it.
You have placed your plugin in the default "Import-Path". Perhaps it is not necessary to set the Plugin-Path inside your application. If your application starts, it will be ok, otherwise I would add the PluginPath, like this:
QDeclarativeEngine::addPluginPath
QDeclarativeEngine::addPluginPath
To copy to clipboard, switch view to plain text mode
Perhaps in your case:
viewer.engine()->addPluginPath()
viewer.engine()->addPluginPath()
To copy to clipboard, switch view to plain text mode
2.
QtCreator can't locate the package, ....It looks like on the image I attached.
I think, you can use your Plugin, you can use your classes, but QtCreator does not know them. Because of this they are underlined.
a.) Look at your qmldir-file. It should mean:
"plugin XMLWriter 1.0"
b.) The following was written inside of the QtCreator-Doc:
Ideally, QML modules have a plugins.qmltypes file in the same directory as the qmldir file. The qmltypes file contains a description of the components exported by the module's plugins and is loaded by Qt Creator when the module is imported.
What i have done:
1.) I compiled the prog in qtcreator-2.3.0\share\qtcreator\qml\qmldump
2.) I called .\release\qmldump by the follwing arguments - perhaps in your case:
./qmldump KornicameisterQML.XMLParser 1.0 /usr/lib/qt4/imports > /usr/lib/qt4/imports/KornicameisterQML/XMLParser/plugins.qmltypes
./qmldump KornicameisterQML.XMLParser 1.0 /usr/lib/qt4/imports > /usr/lib/qt4/imports/KornicameisterQML/XMLParser/plugins.qmltypes
To copy to clipboard, switch view to plain text mode
3.) Important: the file has to be known as "plugins.qmltypes". If you take another name, it will fail. If you know why, post it
4.) Important: After this, if you will design an element inside of the QMLDesigner, QtCreator will always say "Package not found". This is, because he uses his own "Import-Path" located in "qtcreator-2.3.0\bin\". Place a "qt.conf" in qtcreator-2.3.0\bin with the following lines:
[Paths]
Imports = /usr/lib/qt4/imports
[Paths]
Imports = /usr/lib/qt4/imports
To copy to clipboard, switch view to plain text mode
Perhaps this will help...
Good luck
Added after 11 minutes:
@wysota
Isn't it an issue with your package and Qt Creator being built using different compilers?
I think this occures only under Windows with msvc2008, mingw and if you create a Style-Plugin for integrating your components in QMLDesigner, like "customstyleplugin" and "Qt.labs.components.custom". Isn't it?
Bookmarks