[PyQt] QFileDialog , filterSelected() problem

sa6113 s.payandeh at gmail.com
Tue Jun 10 09:13:47 BST 2008

I'm using code like the following,
     s = "Raw data file (*.raw)";
     fd = QFileDialog (self)
     fileName = fd.getOpenFileName("","Text files (*.txt);;All files (*)" ,
self, "Open file")
     self.connect(fd, SIGNAL(filterSelected(const QString &)),
fd,self.filter )
     def filter(self,f) 
        QMessageBox.information(self, "Selected Filter", f )
I want to show a MessageBox to the user that inform s/he about which filter
that selected, 
but it doesn't work, it seems that SIGNAL won't be emitted , What is the

also I can't use :
self.connect(fd, SIGNAL(filterSelected(const QString &)), self,

the error is :
No such slot QFileDialog::setFilter(s)

Would you please help me ?
Looking forward,

View this message in context: http://www.nabble.com/QFileDialog-%2C-filterSelected%28%29-problem-tp17750064p17750064.html
Sent from the PyQt mailing list archive at Nabble.com.

More information about the PyQt mailing list