From pykde Tue Oct 03 07:58:02 2006 From: "Phil Thompson" Date: Tue, 03 Oct 2006 07:58:02 +0000 To: pykde Subject: Re: [PyKDE] PyQt4 question - QFileIconProvider Message-Id: <4754.195.6.25.120.1159862282.squirrel () river-bank ! demon ! co ! uk> X-MARC-Message: https://marc.info/?l=pykde&m=115986253223269 > On Monday 02 October 2006 18:36, Phil Thompson wrote: >> > Hi, >> > >> > I would like to have my own file icon provider for QFileDialog. >> > Therefore, I >> > created a derived class and wanted to overwrite the icon methods. >> > Unfortunately Python doesn't allow to have to methods with the same >> name >> > but >> > 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. >> >> Phil > > I thought so. Unfortunately, my variant of the icon method doesn't get > called, > allthough the iconProvider call to the created QFileDialog shows, that my > IconProvider is installed. What am I doing wrongly? As ever, a small complete example that demonstrates the problem... Phil _______________________________________________ PyKDE mailing list PyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde