[PyKDE] className()

John J. Lee phrxy at csv.warwick.ac.uk
Thu Jul 5 23:34:00 BST 2001


On Thu, 5 Jul 2001, Boudewijn Rempt wrote:
[...]
> >>> from qt import *
> >>> a=QPlatinumStyle()
> >>> print a
> <qt.QPlatinumStyle instance at 0x8308f94>
> >>> print a.className()
> QObject
> >>> print isinstance(a, QPlatinumStyle)
> 1
>
> And I was much surprised. Obviously, sip knows what this is - but
> the className() function doesn't. Is this merely a bug in sip, or
> do I have to parse the repr output?
[...]

Dunno why a.className() does that (maybe it returns the base class -- is
QObject the base class ...?), but how about a.__class__.__name__?


John





More information about the PyQt mailing list