Hello,
I'm trying to output some text into a new file but the file.open call always returns false.
I found the following in the documentation of QFile's open function:Code:QFile file("test.txt"); if(file.open(QIODevice::ReadOnly | QIODevice::Text)){ file.write(ui.label->toPlainText().toUtf8()); file.close(); }
So I thought it may have something to do with the permissions, and I tried :Note: In WriteOnly or ReadWrite mode, if the relevant file does not already exist, this function will try to create a new file before opening it.
But it returns false as well.Code:file.setPermissions(QFile::WriteOwner);
Any idea about how I can create the file ?
My environment :
Qt 4.6.2
Carbide.c++ 2.3.0
S60 5th Edition SDK v1.0
winscw emulator

Reply With Quote


