When calling the static function QFileDialog::getOpenFileNames() from a dialog in my application, I get only one file extension defined by the file filters (rather than both), and only a single file from the target directory (rather all the files available).
Here is getOpenFileNames() being called from from main():
#include <QApplication>
#include <QFileDialog>
#include <QString>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QStringList filenames = QFileDialog::getOpenFileNames(
NULL,
"Select data file",
"/home/gss/Data/",
"Data Files (*.raw *.RAW)" );
}
Browsing to the desired directory with the dialog results in all the .raw and .RAW files being shown.
QT Creator 5.0.2 CentOS 8
doc.qt.io
says:
please, try