QFileDialog sheets
-
I would like to display QFileDialog::getSaveFileName() as a sheet on MacOS. I tried to set dialog parent to the window but it still shows up as normal floating dialog. I' using Qt 5.
Please, how to make it display like a sheet? If it is not possible, how to create a save dialog as a sheet?
-
I don't know if you can modify the window flags of a dialog as it has it's own flag. However, you can create a subclass of QWidget and create your own dialog. You basically need two listviews (one for the system directories, another one for the contents of the Directory selected), a lineEdit in which the user selects the name and a combo box in which he can select the file type. Along with 2 buttons. Depending on your desired file type you use the specific methods to create a file (E.G. for a text file you use TextStream) and you save the file where the user needs it to be saved. Just don't forget to set the widget window flags accordingly.