qt-interest@trolltech.com
[Top] [All Lists]

Re: inheritance of emitted argument types

Subject: Re: inheritance of emitted argument types
From: Malte Witt
Date: Thu, 20 Jul 2006 08:26:02 +0200
> Why don't you simply define your signals as
> void fooThingCreated(const AbstractThing &foo);
> void barThingChanged(const AbstractThing &bar);
> void bazThingClicked(const AbstractThing &baz);

... and if you need some more specific thing somewhere, just use 
qobject_cast<WhateverThingy *>(&foo). But this is not even necessary in 
the given example. I'd really encourage you to use the abstract thing in 
your signals. It even seems a better design to me.

Regards,
Malte

--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>