Important: Please read the Qt Code of Conduct -

Android access filesystem crash

  • I have a crash with my app on android.
    I have a custom model based on QFileSystemModel. This is causing the crash.
    I have the android permissions setup fine.
    The problem seems to be that no matter what I use for the rootPath, it always uses "/" which causes a segmentation fault. I assume this needs root access obviously...

    Any idea how I can debug the QFileSystemModel to see why its no accepting my path?

        mFileSystemModel = new QFileSystemModel();
        mFileSystemModel->setFilter(QDir::AllDirs | QDir::NoDot);
        mFileSystemModel->setRootPath(Util::getHomeLocation()); // crash using QStandardPaths::locate(QStandardPaths::GenericDataLocation, QString(), QStandardPaths::LocateDirectory)

  • Lifetime Qt Champion

    @Gibbz said in Android access filesystem crash:


    What does it return?

Log in to reply