Hello,
I'm trying to output some text into a new file but the file.open call always returns false.
Qt Code:
  1. QFile file("test.txt");
  2. if(file.open(QIODevice::ReadOnly | QIODevice::Text)){
  3. file.write(ui.label->toPlainText().toUtf8());
  4. file.close();
  5. }
To copy to clipboard, switch view to plain text mode 

I found the following in the documentation of QFile's open function:
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.
So I thought it may have something to do with the permissions, and I tried :
Qt Code:
  1. file.setPermissions(QFile::WriteOwner);
To copy to clipboard, switch view to plain text mode 
But it returns false as well.

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