Multiple filters in QFileDialog

Do you known how to add multiple filters in to the QFileDialog?

Here you are:

QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setNameFilter(tr("Keys (*.pem *.txt);;All (*.*)"));

Leave a Reply

Your email address will not be published. Required fields are marked *