[Qt-interest] Force file extension with QFileDialog::getSaveFileName?

David Doria daviddoria at gmail.com
Tue Jun 21 17:40:47 CEST 2011


When I use QFileDialog::getSaveFileName, it allows the user to type
any file name. What I would like to do is ensure the result of this
dialog ends with one of the valid extensions specified by the filter
(*.png *.bmp - etc). Is there an option for this?

Thanks,

David



More information about the Qt-interest-old mailing list