[PyKDE] className()
Boudewijn Rempt
bsarempt at xs4all.nl
Fri Jul 6 08:41:32 BST 2001
On Thu, 5 Jul 2001, John J. Lee wrote:
> 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__?
>
Thanks! There's always something to learn - and now I'm so fixated
on the Qt in PyQt that I forget the Py part...
More information about the PyQt
mailing list