What will be the code for not overwriting the text file you make.
ofstream myfile;
myfile.open (home/.test.txt);
myfile << "test";
myfile.close();
Because the test.txt is needed to create only just once after you load the widget. I inserted that code to the mainWindow but whenever I loaded the mainWindow the test.txt is always do a new file with the same value test. But I need the test.txt to be read/write because I use it in a TextBuffer. Thanks!