https://bugs.kde.org/show_bug.cgi?id=359528

            Bug ID: 359528
           Summary: QFileDialog::selectedNameFilter returns a different
                    value from what was set using
                    QFileDialog::selectNameFilter
           Product: frameworks-frameworkintegration
           Version: unspecified
          Platform: Archlinux Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kdelibs-b...@kde.org
          Reporter: ahiems...@heimr.nl

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.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to