[Kde-perl] slot searched in the base class instead of the derived one

Germain Garand kde-perl@mail.kde.org
Sat, 7 Dec 2002 12:40:29 +0000


Le Samedi 07 D=E9cembre 2002 00:09, St=E9phane Payrard a =E9crit :
> To get the hang of Qt, I am writing a small appli to display
> perl docs.  Can you help me with the following code extracted
> from that appli.
> PerlQt barks:
>
> QObject::connect: No such slot QApplication::showdoc(int)
> QObject::connect:  (sender name:   'unnamed')
> QObject::connect:  (receiver name: 'sdoc')
>
> I am puzzled: why the slot is searched in Qt::Application
> instead of my subclass DocAppli?
> I am probably getting something wrong. But I can't see what.
>

Ah, yes, damn, I forgot that : there are still problems with subclassing =
the=20
Qt::Application class (some hacks made it a bit special).
I'll have a look and see if I can fix it before the release.
However, for normal applications, and unless you really have a need to=20
reimplement some Qt::Application virtuals, it is not recommended to subcl=
as=20
it.... better subclass the MainWindow class for instance, since that woul=
d be=20
the real logical core of your app.

G.


> Thx