Important: Please read the Qt Code of Conduct -

QFileSystemModel with QT for android - permission denied problem

  • Hello,

    I am using Qt 5.12.3 to make a native file browser for android, using QFileSystemModel. Here is the code that i used :

    dir_model=new QFileSystemModel(this);
    dir_liste=new QTreeView(this);

    I add permission "android.permission.READ_EXTERNAL_STORAGE" and "android.permission.WRITE_EXTERNAL_STORAGE" to the AndroidManifest.xml file.

    Also i add manual permission : Settings-> apps -> permissions -> storage, for my android app.

    When i run my app i get an empty :/ directory as in the image below, with the output message :
    E inotify_add_watch(/) failed: (Permission denied)

    An other file browser application work fine (picture below) after enabling acces.


    Is there a way to allow acces permission for the QFileSystemModel to show the storage memory contents ?

Log in to reply