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

List:       kde-core-devel
Subject:    Re: Problem with QApplication::sendEvent
From:       Richard Moore <rich () ipso-facto ! freeserve ! co ! uk>
Date:       2000-07-28 18:29:07
[Download RAW message or body]



Wilco Greven wrote:
> 
> On Fri, Jul 28, 2000 at 05:11:26PM +0100, Richard Moore wrote:
> >
> >
> > Wilco Greven wrote:
> > >
> > > Hi,
> > >
> > > I am trying to send mouseEvents on kicker's border to the appropriate
> > > buttons. But there is a problem. In the panel's eventFilter I 'catch'
> > > the events which occur on the border. Then I send a new event, which
> > > is equal to the catched one except for its position, using
> > > QApplication::sendEvent.
> > >
> > > Now the problem is that AFAIK QApplication doesn't set qt_button_down
> > > for this event. So the result of such a fake event is not the same as
> > > that of an event received from the window system. Does anyone know why
> > > this difference is made?
> >
> > Why not call animateClick() instead - it's a lot easier.
> 
> Thanks for the hint, but I don't think it's that easy. When should you call
> animateClick? When the user presses on the border or when the user releases
> the mousebutton on the border?

Hmm, good question. I guess it would need to be on the release (ie. a
complete click on the border).

> 
> And the way I described is much more powerful, because it can redirect
> events to applets too. Well, if it worked....

That would be nice. Maybe you could try using postEvent() instead,
sendEvent calls the notify() method directly, where as postEvent
uses the event queue.

Rich.

> 
> > Rich.
> >
> > >
> > > Greetings,
> > > Wilco
> >
> > --
> >      Richard Moore            rich@ipso-facto.freeserve.co.uk
> > http://www.robocast.com/      richard@robocast.com
> > http://developer.kde.org/     rich@kde.org
> >

-- 
     Richard Moore		rich@ipso-facto.freeserve.co.uk
http://www.robocast.com/	richard@robocast.com
http://developer.kde.org/	rich@kde.org

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

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