I would like to filter the files that are shown in a QFileDialog
more specifically than just by file extensions. The examples I found in the Qt documentation only show filters like Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)
and such. In addition to this I would also like to specify a filter for files that should not show up in the file dialog, e.g. XML files (*.xml)
but not Backup XML files (*.backup.xml)
.
So the problem I have is that I would like to show some files in the file dialog that have certain file extension, but I would not like to show other files with a specific file name suffix (and the same file extension).
For example:
Files to show:
file1.xml
file2.xml
Files not to show:
file1.backup.xml
file2.backup.xml
I would like to ask if it is possible to define filters like these for a QFileDialog
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…