Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Embed editable resources
Qt 6.11 is out! See what's new in the release blog

Embed editable resources

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    remy_david
    wrote on last edited by
    #1

    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.

    Thanks

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        remy_david
        wrote on last edited by
        #3

        Thanks, that's what I though.
        I am looking into the DEPLOYMENT qmake variable right now :
        http://developer.qt.nokia.com/doc/qt-4.8/qmake-variable-reference.html#deployment
        It should do what I want for Symbian but is there an cross-platform way of doing this ?

        1 Reply Last reply
        0
        • R Offline
          R Offline
          remy_david
          wrote on last edited by
          #4

          Ok so this code works well on device :
          .pro
          @mydeployment.sources = myfolder/*
          mydeployment.path = mydeploymentfolder
          DEPLOYMENT += mydeployment@
          .cpp
          @
          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 ?

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved