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

List:       kde-devel
Subject:    Re: propagating events
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2005-06-21 7:41:13
Message-ID: 20050621074113.GD4287 () morpheus ! apaku ! dnsalias ! org
[Download RAW message or body]

On 21.Jun 2005 - 01:44:57, Stefan Kombrink wrote:
> On Tuesday 21 June 2005 00:49, Andreas Pakulat wrote:
> > On 20.Jun 2005 - 23:52:59, Stefan Kombrink wrote:
> > > On Monday 20 June 2005 23:13, Andreas Pakulat wrote:
> > > > On 20.Jun 2005 - 23:02:33, Stefan Kombrink wrote:
> > > > return mParent->event(e);
> > >
> > > Yeah, seems obvious, but you can't do that since it is protected!
> >
> > Right, I shouldn't have written that from memory, but have a look at my
> > own app...
> >
> > > > to propagate the Event to your Parent.
> > > >
> > > > Andreas
> > >
> > > Now my code looks like that (and it works)
> > >
> > > bool QSensorConfig::event( QEvent *e )
> > > {
> > >     if ( !QWidget::event( e ) )
> > >         return QApplication::sendEvent( mParent, e );
> > >     else return true;
> > > }
> >
> > Hmm, if that's your event() function, why have one at all? I mean,
> > you're not doing anything, but sending the events to your parent, which
> > is also done if you don't override event() from QWidget.
> 
> But if holding the focus it doesn't propagate any events to its parent, if I 
> won't have this function.
> I'd be glad if that was the default behaviour, but it seems I need to overload 
> somehow.

Ok, I'm not that much into Focus+Event-Stuff. But there is a FocusPolicy
called "NoFocus", that may help...

Andreas

-- 
You will be called upon to help a friend in trouble.
 
>> 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