Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Loading and saving using QFile on Android

    Mobile and Embedded
    2
    3
    1106
    Loading More Posts
    • 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.
    • M
      Marco Polo last edited by

      I want to create a game where I could save different scores. I use a QMap, which I insert into the file and read it afterwards (using save() and load() methods, which I wrote). Somewhere in the internet I found that android devices always create a file on the sdcard of the device that belongs to the app with a path like "/sdcard/app_appname". I used this file with the corresponding path to save and load my data and everything worked, but... The problem is that not every android device has an sdcard. So I tried it with the qt resource file system but the path on android seems to be different to the one that works on desktop applications. My question now is what the path is on android.

      Marco Polo

      1 Reply Last reply Reply Quote 0
      • K
        kolegs last edited by

        I think good idea is to read about QStandardPath class and to be more preciese about this QStandardPaths::AppDataLocation

        1 Reply Last reply Reply Quote 0
        • M
          Marco Polo last edited by

          Thanks, I will read it.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post