Embed editable resources

  • Hello,

    I know how to embed and use read-only resources with Qt and Qt Quick using the qrc system.
    What I now need is editable resources. I want to embed a resource at compile time and update it at runtime if necessary.
    How can I do ? I am targeting Symbian.


  • Moderators

    You can't do that using the QRC system: Resources are put into a read only section of the binary, so they can not be changed. Even if that was possible: Do you really want to update your executable file on disk all the time?

    I think the most straight forward way to do this is to store your data as files on disk. Symbian has the concept of a application private folder IIRC, so that would be a good place to store your data. Please read up on the security system of Symbian for more information on this.

  • Thanks, that's what I though.
    I am looking into the DEPLOYMENT qmake variable right now :
    It should do what I want for Symbian but is there an cross-platform way of doing this ?

  • Ok so this code works well on device :
    @mydeployment.sources = myfolder/*
    mydeployment.path = mydeploymentfolder
    DEPLOYMENT += mydeployment@
    QDir d(QApplication::applicationDirPath() + "/mydeploymentfolder");
    qDebug() << d.exists() << d.entryList();

    However, this is not working on Nokia SDK Simulator.
    Any idea to make it work on Nokia SDK Simulator ?

Log in to reply

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