View Full Version : QIODevice::write: device not open” when file is open

24th October 2016, 18:50
hi if i am using some file and it's openned. I can't write there? This error can crash my program? or it's only one alert? thx again!

24th October 2016, 21:15
If you open a file read-only you cannot write. If you open file for write in a location that can be removed then you might be able to write for a while and then fail. ..Or writing might totally hang your application... There are many variations and you have provided no information.

If they cannot write a simple file then Qt IO functions generally fail to write and return, outputting a warning to the console/debug stream. It would be very poor form to fail to rely on this instead of programming to do something known and controlled if writing fails.