We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2014-01-28 19:23:59 +0200

Importing QML modules

Because of Harbour rules, I need to ship my app with QtWebKit.experimental but I'm having hard time importing it from shared private library location.

This is how my /usr/share/$NAME looks like.

/usr/share/harbour-app/
    qml/
        main.qml
        ...
        experimental/
            libqmlwebkitexperimentalplugin.so
            qmldir

And qmldir contains:

module harbour.app.qtwebkit.experimental
plugin qmlwebkitexperimentalplugin

When trying to use the module from .qml file I get

[W] unknown:4 - file:///usr/share/harbour-app/qml/pages/SettingView.qml:4:1: module "harbour.app.qtwebkit.experimental" is not installed 
     import harbour.app.qtwebkit.experimental 1.0 
     ^

How is this done correctly?

Importing QML modules

Because of Harbour rules, I need to ship my app with QtWebKit.experimental but I'm having hard time importing it from shared private library location.

This is how my /usr/share/$NAME looks like.

/usr/share/harbour-app/
    qml/
        main.qml
        ...
        experimental/
            libqmlwebkitexperimentalplugin.so
            qmldir

And qmldir contains:

module harbour.app.qtwebkit.experimental
plugin qmlwebkitexperimentalplugin

When trying to use the module from .qml file I get

[W] unknown:4 - file:///usr/share/harbour-app/qml/pages/SettingView.qml:4:1: module "harbour.app.qtwebkit.experimental" is not installed 
     import harbour.app.qtwebkit.experimental 1.0 
     ^

How is this done correctly?

Edit:

I have set in .pro file

QML2_IMPORT_PATH += /usr/share/$$TARGET/qml
QML_IMPORT_PATH += /usr/share/$$TARGET/qml

but it doesn't help.

Importing private QML modules

Because of Harbour rules, I need to ship my app with QtWebKit.experimental but I'm having hard time importing it from shared private library location.

This is how my /usr/share/$NAME looks like.

/usr/share/harbour-app/
    qml/
        main.qml
        ...
        experimental/
            libqmlwebkitexperimentalplugin.so
            qmldir

And qmldir contains:

module harbour.app.qtwebkit.experimental
plugin qmlwebkitexperimentalplugin

When trying to use the module from .qml file I get

[W] unknown:4 - file:///usr/share/harbour-app/qml/pages/SettingView.qml:4:1: module "harbour.app.qtwebkit.experimental" is not installed 
     import harbour.app.qtwebkit.experimental 1.0 
     ^

How is this done correctly?

Edit:

I have set in .pro file

QML2_IMPORT_PATH += /usr/share/$$TARGET/qml
QML_IMPORT_PATH += /usr/share/$$TARGET/qml

but it doesn't help.