Important: Please read the Qt Code of Conduct -

File Operations with QT on Android and in general

  • Wabelabadubdub,

    my system is a Sony Xperia Z2 running Android.

    I´m asking my self how to do fileoperations. For example the simplest things with fopen, fclose, fprintf etc.
    1.) Does Android work with normal .txt files?

    2.) my first stumble is, where would these files be on the system? As far as i understood it, i can´t browse through the filesystem in the phone like on a normal computer. Usually files are located in the program directory if not ohterwise specified. Where would this be on Android? Where the App is, where is it?

    3.) Is there a Qt-based solution, that is not particular to Android?


  • Lifetime Qt Champion


    QFile and QStandardPaths comes to mind for these tasks

    Hope it helps

Log in to reply