When I compile my program I get the error message "QIODevice::write: device not open" this program worked on my old computer but for some reason its not working on my new computer. Any insight on how to fix this error would be greatly appreciated, thanks.
file.open(QIODevice::Append);
file2.open(QIODevice::Append);
QTextStream stream(&file); //stream of information
QTextStream stream2(&file2);
//write to file
//code continued here, deleted to post here... stream << whatever, stream2 << whatever whatever...
//end stream
stream << endl;
stream2 << endl;
//close file
file.close();
file2.close();
The problem was I was creating the file in a place that did not exist on this computer changed the location to create the folder and it fixed it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With