Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-11352

QFileDialog::getSaveFileName() -- tie default suffix to selected filter

    XMLWordPrintable

Details

    Description

      Quick feature request – when I'm using a file dialog created by getSaveFileName(), and I have a name filter selected (e.g. "*.jpg"), and I type in a file name with no extension, it would be nice if the file name returned by the function had the suffix appended.

      If it would be too much of a change to make this the default, maybe it could be a new option in QFileDialog::Options?

      This function is being used in my app to save an image, and I use the file extension supplied by the user to determine the image format. If the user has already picked a specific extension from the filter dropdown, it'd be nice if they didn't have to type it in as well.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Unassigned Unassigned
              bholm Benedikte Holm (Inactive)
              Votes:
              8 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes