[PyQt] User selected filter in QFileDialog

barmanoo olivier.friard at gmail.com
Tue Jun 30 13:14:27 BST 2009


Hi,


I have a problem with QFileDialog to check what filter the user has
selected.

My code is:



fd=QFileDialog(self)

projectFileName=fd.getSaveFileName(self,'Save the current
project','','project type 1 (*.project1);;project type 2 (*.project2);;All
files (*)','project type 1 (*.project1)')

selected_filter=str(fd.selectedNameFilter())


Unfortunatly whatever filter the user had selected the selected_user
variable always contains "All Files (*)". There is no way to know what
filter was used by the user.


Any idea?

Thank you for your help


Barmanoo





-- 
View this message in context: http://www.nabble.com/User-selected-filter-in-QFileDialog-tp24270454p24270454.html
Sent from the PyQt mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090630/5c814974/attachment.html


More information about the PyQt mailing list