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

Re: Mouse tracking in QtCanvasView subclass

Subject: Re: Mouse tracking in QtCanvasView subclass
From: Joel Uckelman
Date: Mon, 17 Apr 2006 12:00:58 +0200
Thus spake Yuriy Rusinov:
>     protected:
>         virtual void mouseMoveEvent(QMouseEvent *e);
>         virtual void contentsMouseMoveEvent(QMouseEvent * e);
> ...
> };
>  but nothing changed, for example signals contentsMouseMove
> (QMouseEvent* e) or mouseMove (QMouseEvent* e) does not emitted and
> debug messages in this events processors are not write, but when I press
> mouse button, all events are happened.

If your mouseMoveEvent() neither ignores events nor passes them on
directly to QtCanvasView::mouseMoveEvent() (which itself ignores events),
then your contentsMouseMoveEvent() will never be called, because the viewport
will never receive the event. contentsMouseMoveEvent() is a wrapper for
the mouseMoveEvent() function belonging to the viewport.
 
-- 
J.

--
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>