[PyQt] PyQt4 question
David Boddie
david at boddie.org.uk
Sun May 27 23:21:09 BST 2007
On Sun May 27 22:57:23 BST 2007, Andreas Pakulat wrote:
> On 27.05.07 14:53:08, Detlev Offenbach wrote:
> > On Sonntag, 27. Mai 2007, Giovanni Bajo wrote:
> >
> > > Uh? Does QDesignerFormEditorPluginInterface inherit from QObject?
> > > Otherwise, I can't see how the qobject_cast can work.
> >
> > I have no idea. I had a look into edyuk, and they do it that way and it
> > works there (unless there is some magic somewhere else in their code).
>
> One reason could be that the QDesignerFormEditorPluginInterface is a
> Q_INTERFACE and the real QObject-derived implementation declares its
> inheritance from that interface. I guess qobject_cast<> takes that into
> account.
That makes sense. Those classes are supposed to be subclassed (mixed in) with
QObject in C++ in order to declare interfaces. You would never subclass them
alone.
David
More information about the PyQt
mailing list