[PyQt] QFileDialog, filter problem

sa6113 s.payandeh at gmail.com
Sun Jun 8 06:25:59 BST 2008


I want to add  "All supported opetions(All file)", in "Files of type" in
"getOpenFileName ",I mean I don't want to show the user what the supported
file are. While user select " All supported opetins(All file)" s/he can
select all supported file. 

For example in Windoes Media player, Open file, in Files of type, there is a
option "Media file(All types)" by selecting that, user can see and select
all media file. 

When I use "getOpenFileName" : 
QString QFileDialog::getOpenFileName ( const QString & startWith =
QString::null, const QString & filter = QString::null, QWidget * parent = 0,
const char * name = 0, const QString & caption = QString::null, QString *
selectedFilter = 0, bool resolveSymlinks = TRUE ) [static] 
I couldn't left secound argument (filter) empty, if I put "null" it
considers that as "All File (*.*)" and if I put a filter there it will show
that filter while I don't want to show that filter name , I just want to
show "All Supported File". 
Is there any way that I can do something such as: 
For example: 
QString all Supported File = "*.jpg *.png *.gif" 
QFileDialog.getOpenFileName("c:\", all Suppoted File, this ) 
And QfileDialog shows exactly "all supported file" in "Files of type" and
also filters that files?
-- 
View this message in context: http://www.nabble.com/QFileDialog%2C-filter-problem-tp17715789p17715789.html
Sent from the PyQt mailing list archive at Nabble.com.



More information about the PyQt mailing list