See the attached code example. When creating a QFileDialog with several name filters that have the same extension, calling QFileDialog::selectedNameFilter after QFileDialog::exec will return the first entry with that extension rather than the actual selected filter. I believe this is due to the conversion from Qt's name filters to what the KDE file dialog expects. Note that QFileDialog::selectNameFilter does seem to do the right thing, since the correct file type filter is selected on opening the dialog. Reproducible: Always Steps to Reproduce: 1. Run the attached code (needs PyQt5) 2. Observe the printed selected filter name Actual Results: "Test File Type (*.test)" is printed. Expected Results: "Another Test File Type (*.test)" is printed.
Created attachment 97280 [details] Example code to reproduce the issue
Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved.