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.