cannot open file on qt6.5 for andriod

24 Views Asked by At

there is a already exist file name u1.txt but cannot open it , code : enter image description here

log like that: enter image description here

already has prommission enter image description here

void MainWindow::on_test_2_clicked()
{

    QFile wenjian("/storage/emulated/0/10/u1.txt");
    bool ok = wenjian.open(QIODevice::ReadWrite);
    qDebug() <<ok;

    bool exist = QFile::exists("/storage/emulated/0/10/u1.txt");
    qDebug() <<exist;
}

0

There are 0 best solutions below