Important: Please read the Qt Code of Conduct -

QFileDialog with filter "All files (*)" or "All files (*.*)" problem

  • Using Qt 5.11.1 on Linux Ubuntu 18.04 LTS and the default (Nautilus) file manager:

    When I add "All files (*.*)" or "All files (*)" to the filter in the call to QFileDialog::getSaveFileName(), no files are displayed in the folder. When choosing any other filter, the files containing the appropriate extension are displayed. The file name entered by the user is returned properly, but it would be nice to select an existing file name and tweak it, for example. At present, the user must type in the entire file name.

    Shouldn't all existing files in the folder be displayed when "All files" is selected?

    Perhaps this is a Nautilus bug?

  • In the meantime I have discovered that at times, other filters are ignored. Can't make sense of this, though. I suspect that the last filter in the list is being ignored, but need to do more testing.

  • Moderators

    please post the code of the filter.
    The "All Files" filter should be the last filter in the list.

  • @raven-worx Thank you for replying. It seems to be working now, I really don't know what went wrong. I must have had a typo in the filter somehow.

Log in to reply