I have made a simple qt4-app with Carbide ide.
In one of my functions i am trying to write some text to a text-file but it is not working. I added file name result.txt to the project in Carbide.

Here is the code:
Qt Code:
  1. QFile file("result.txt");
  2. file.open(QIODevice::WriteOnly);
  3. QDataStream out(&file); // we will serialize the data into the file
  4. out << QString("victory"); // serialize a string
To copy to clipboard, switch view to plain text mode 

I also have included <QFile> and <QDataStream> in cpp-file.

The program dosent show any errors but it dosent write anythink to the file.