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

Linux: QGtk3FileDialogHelper doesn't support case insensitiv name filter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.5.1
    • None
    • Ubuntu 15, Qt5.5.1

    Description

      The nativ file dialog doesn't support case insensitiv name filters, but the buildin qt dialog does.

      The following code will open a file dialog which shows only images with lower case file extension.

      QStringList mimeTypeFilters;
      mimeTypeFilters << "image/jpeg" // will show "JPEG image (*.jpeg *.jpg *.jpe)
                  << "image/png"  // will show "PNG image (*.png)"
                  << "application/octet-stream"; // will show "All files (*)"
      
      QFileDialog dialog(this);
      dialog.setMimeTypeFilters(mimeTypeFilters);
      dialog.exec();
      

      The buildin qt dialog shows the images independent of the case.

      dialog.setOption(QFileDialog::DontUseNativeDialog, true);
      

      Using the gtk_file_filter_add_custom
      https://developer.gnome.org/gtk3/stable/GtkFileFilter.html#gtk-file-filter-add-custom

      may solve the problem.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            prueckl thomas
            Votes:
            7 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes