QML XmlListModel source from qt resource file on android



  • Hello everybody,

    how can I access a xml file from the resource file on android. Are there any special settings that need to be taken. I've tried something like:

    @XmlListModel {
    source: "qrc:/file.xml"
    ///...
    } @

    and:

    • qrc:///file.xml
    • :/file.xml
    • :///file.xml
    • file.xml
    • ...

    Resourse file is:
    @<RCC>
    <qresource prefix="/">
    <file>main.qml</file>
    <file alias="keyStorage">file.xml</file>
    </qresource>
    </RCC>@

    I've added the resources in the .pro file.



  • Can you show us your resource file?

    From qml I would access it like this:
    qrc:///file.xml


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.