i want write a string to a text file when i press the button but no matter how much i press the button the string gets written on the first line on the text file so how can i do it? My code inside the buttons function is this:
QFile filename(".../Save.txt");
filename.open(QIODevice::WriteOnly | QIODevice::Text);
QTextStream stream(&filename);
QString str = "Line";
stream << str << endl;