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

Linux: QGtk3FileDialogHelper doesn't support case insensitiv name filter

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.5.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      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

            • Assignee:
              qt.team.quick.subscriptions Qt Quick and Widgets Team
              Reporter:
              prueckl thomas
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes