dimanche 5 juin 2016

Qt: How can I open the text file in relative path?

QFile file("../studentdata/students.txt");
file.open(QIODevice::WriteOnly| QIODevice::Text);

qDebug()<<file.isOpen()<<file.isReadable()<<file.isWritable();

I want to open the file students.txt with relative path, but the qDebug result is false false false

Aucun commentaire:

Enregistrer un commentaire