[SailfishDevel] Howto ship QML plugins for harbour

Reto Zingg reto.zingg at jolla.com
Fri Jan 10 08:06:19 UTC 2014


On 09.01.2014 12:39, dcaliste at free.fr wrote:
> Hello,
>     I need to ship two system QML plugins with my app for it to validate the
> harbour recommendations. How can I do this ?
> Let's take the example of QtPositioning

lets take an other example ;-)


which is not allowed as such in Harbour, so I had to add it:

I had to make changes in plugin.cpp and qmldir and install it 
accordingly (see dbus.pro, qmldir installs to 
/usr/share/$NAME/lib/harbour/simpletorch/dbus, and lib to 

I had to set the addImportPath to /usr/share/$NAME/lib/ and then I can 
import is in .qml files as:

import harbour.simpletorch.dbus 1.0


> We have:
> [nemo at SailfishEmul devel]$ rpm -ql qt5-qtdeclarative-import-positioning
> /usr/lib/qt5/qml/QtPositioning
> /usr/lib/qt5/qml/QtPositioning/libdeclarative_positioning.so
> /usr/lib/qt5/qml/QtPositioning/plugins.qmltypes
> /usr/lib/qt5/qml/QtPositioning/qmldir
> So, in the spec file, I can install these three files in
> /usr/share/$APPNAME/qml. But in the FAQ of the harbour, they say that one should
> rename the import to harbour.appname.QtPositioning, when I grep QtPositioning in
> qmldir and plugins.qmltypes, it appears a lot of times. Should I replace all
> with APPNAME-QtPositioning ? Then, should the directory be renamed also ?
> And finally, when all is shipped in the RPM, and everything has been renamed
> properly, how can I expand the QML search dir to include also
> /usr/share/$APPNAME/qml ?
> Thanks for the help, have a nice day,
> Damien.
> _______________________________________________
> SailfishOS.org Devel mailing list

More information about the Devel mailing list