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.
the problem is that ofstream creates a file if it doesn't exist. But Qfile does not.Qt Code:
#include <fstream> int main() { ofstream file("file1.txt"); string s = "how are you?"; file << s; }To copy to clipboard, switch view to plain text mode
Bookmarks