[Qt-interest] Force file extension with QFileDialog::getSaveFileName?
Constantin Makshin
cmakshin at gmail.com
Tue Jun 21 17:50:58 CEST 2011
"Brute force" method — if the user specifies incorrect extension (e.g., enters "foo.exe" into the file name box when saving a picture), replace it or simply append a valid one when opening the file.
On Tuesday, June 21, 2011 07:40:47 PM David Doria wrote:
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110621/59a11edb/attachment.bin
More information about the Qt-interest-old
mailing list