[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: [kde-devel] KWizard/QWizard problem
From:       Debian User <fritmebufstek () pandora ! be>
Date:       2002-06-08 22:16:32
[Download RAW message or body]

On Sat, Jun 08, 2002 at 01:43:43PM -0400, Nadeem Hasan wrote:
> On Saturday 08 June 2002 01:10 pm, Christian Weickhmann wrote:
> > Hello again!
> >
> > > Could you also post your "connect" statement? The QWizard::vertItem()
> > > looks suspicious to me, since that slot is only implemented in a subclass
> > > of QWizard, so QWizard::vertItem() has to be non-existant.
> >
> > it looks like:
> >
> > QTimer *zeit;
> > zeit = new QTimer(this);
> >
> > connect(zeit, SIGNAL( timeout() ), This, SLOT( vertItem() ) );
> 
> Hmmm, looks ok to me as long as "this" refers to the class that implements 
> the vertItem() slot.

Hm... i don't think you have understood how Qt and C++ work: connect is
defined as connect( QObject*, const char*, QObject*, const char* ), so
casting the this to some other type of pointer will only cause it to be
cast back by your compiler... Furthermore, slots don't work like c++
members, if you cast a pointer to a parent type pointer, the slots of
the original type are still available through the QObject* interface...

bye
domi

-- 
Dominique Devriese
Mijn gpg publieke sleutel vind je op:
http://users.pandora.be/frit/domi.gpg

[Attachment #3 (application/pgp-signature)]
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic