[PyQt] filterSelected
Phil Thompson
phil at riverbankcomputing.com
Mon Sep 15 17:16:38 BST 2008
On Mon, 15 Sep 2008 16:01:06 +0000 (GMT), Mathe Zoltan <mazotyo at yahoo.fr>
wrote:
> Hi,
> I have a problem the filterSelected dosn't work in qt4. I am using the
> following code.
> saveDialog = QFileDialog(self)
> self.connect(saveDialog, SIGNAL("filterSelected(const QString
> &)"),self.filter )
> filters = ['*.opts' ,'*.xml','*.txt']
> saveDialog.setFilter(';;'.join(filters))
> fileName = saveDialog.getSaveFileName(self, self.tr("Save Files"),
>
> QDir.currentPath(),
>
> ';;'.join(filters))
> Dou you know what is the problem? I have no idea what is wrong.
getSaveFileName() is a static method of QFileDialog. It creates its own
QFileDialog instance and not the one you have created.
Phil
More information about the PyQt
mailing list