Saving file using the QFileDialog::getSaveFileName to restricted location doesn't give error message

StackOverflow https://stackoverflow.com/questions/12566317

  •  03-07-2021
  •  | 
  •  

Question

i Am working on sample QT project on MAC and to save files i am using the QFileDialog::getSaveFileName API with native dialog and if i save the file to directory which is read only it still gets saved !!! but the behaviour should be it should give error message. When i observed on windows system everything works fine it gives error message but on MAC id doesn't can anyone faced this earlier??

Was it helpful?

Solution

getSaveFileName() just returns a path to the location the user chose. It doesn't actually create any files. Permission are not an issue until you attempt to actually create/write to the file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top