QFileDialog::getOpenFileName Filter String

  • I am using the static native open window function call, I am setting the filter string "All formats (*.a *.b etc..)" but it is too long to fit on the screen. I have 50 some extensions so I was wondering if there is a way to have a "All format" selection without having to have all the extensions in it.

  • You could always use the classic star () .
    So you would have something like this:
    dialog.setNameFilter(tr("All formats (

  • I don't mean have every extension possible, I only want all of "my" formats where. That's the same thing as doing
    @All Files (.)@
    , which I don't want (I wouldn't even need a filter in this case).

  • Ok then i would suppose you need:
    dialog.setNameFilterDetailsVisible ( false );

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.