Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QFileSystemModel with QT for android - permission denied problem
Forum Updated to NodeBB v4.3 + New Features

QFileSystemModel with QT for android - permission denied problem

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 460 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.
  • Z Offline
    Z Offline
    ZINE
    wrote on last edited by ZINE
    #1

    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);
    dir_model->setRootPath(QDir::rootPath());
    dir_liste->setModel(dir_model);

    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 libFileDialog.so: inotify_add_watch(/) failed: (Permission denied)
    0_1563832866396_Screenshot_20190722-235826.jpg

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

    0_1563833026720_Screenshot_20190722-235846.jpg

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

    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