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

List:       kde-devel
Subject:    Re: Mouse events?
From:       Richard Moore <rich () ipso-facto ! freeserve ! co ! uk>
Date:       1999-04-28 13:45:43
[Download RAW message or body]



Sven Radej wrote:
> 
> On Wed, 28 Apr 1999, Daniel Marjamäki wrote:
> >Hello fellows,
> >how do I detect these events when no mousebutton is pressed?
> >mousemove : the mousecursor moves over my QWidget.
> >mouseout : the mousecursor moves away from my QWidget.
> 
> First you have set mous tracking:
> void QWidget::setMouseTracking ( bool enable );
> 
> Then you can reimplement:
> mouseMoveEvent - for tracking moving in the widget
> mouseEnterEvent - called when mouse enters the widget
> and
> mouseLeaveEvent - called when mouse leaves the widget
> 
> All *Events are virtual protected functions of QWidget.

you can also use an event filter here if you want (you still need to
turn tracking on though).

Rich.

> --
> Sven Radej     radej@kde.org
> KDE developer   Visit http://www.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