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

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

  •  03-07-2021
  •  | 
  •  

문제

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??

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top