[PyKDE] PyQt4 question - QFileIconProvider
phil at riverbankcomputing.co.uk
Mon Oct 2 17:36:15 BST 2006
> I would like to have my own file icon provider for QFileDialog. Therefore,
> created a derived class and wanted to overwrite the icon methods.
> Unfortunately Python doesn't allow to have to methods with the same name
> different signature. How do I implement the two virtual icon methods of
> QFileIconProvider, so that they get called by a QFileDialog after the icon
> provider of the dialog was set?
You need to type check the argument yourself (eg. isinstance(arg,
QFileInfo)) to work out how it was called.
More information about the PyQt