Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
FileDialog save file default name
MartinD last edited by
how to preset file name in qml save file dialog (I want to set some default file name in the dialog)?
enzenb last edited by
It's not possible. Even worse, if you reuse the FileDialog, it will default to the last file selected even if this is not what you want. This is one of many bugs and missing features why I think that QtQuick Controls are simply not ready for production use.
There is no simple workaround but if you are willing to add custom C++ code to your QML project, have a look at Advanced FileDialog in QML, which presents a solution that works on Windows, Mac and Gnome.
@MartinD Set the
folderproperty of FileDialog to the url of the target folder with the preset file name.