Can anyone please explain file handling in Qt?
Please specify how a file is created. I was earlier using c++, so please give an equivalent Qt code for the following.
Qt Code:
  1. #include <fstream>
  2.  
  3. int main()
  4. {
  5. ofstream file("file1.txt");
  6. string s = "how are you?";
  7. file << s;
  8. }
To copy to clipboard, switch view to plain text mode 
the problem is that ofstream creates a file if it doesn't exist. But Qfile does not.