|
|
On 27.12.07 14:43:50, Stephan Rose wrote:
>
> On Thu, 2007-12-27 at 14:31 +0100, Peter Prade wrote:
> > > Since my child widget can be any kind of widget, I can't subclass
> > > focusOutEvent in the child widget.
> >
> > install an eventfilter for that event instead:
> > http://doc.trolltech.com/4.3/eventsandfilters.html#event-filters
> > http://doc.trolltech.com/4.3/qobject.html#installEventFilter
>
> Thanks, that does the trick.
>
> However, doesn't this completely defeat the purpose of having signals
> and slots?
No, there are things that are better done with Events than signals and
slots. In particular Events can be combined into one, like paint events,
whereas a slot connected to a signal is always executed as many times as
the signal is emitted.
Last but not least: I trust that there's a reason events exist in Qt, so
there probably are more reasons to have no signals for some things that
are currently done by events.
Andreas
--
You have been selected for a secret mission.
--
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/
|
|