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

Re: Mouse tracking in QtCanvasView subclass

Subject: Re: Mouse tracking in QtCanvasView subclass
From: Yuriy Rusinov
Date: Fri, 14 Apr 2006 11:21:18 +0400
Hello, All

Thus spake Yuriy Rusinov:


Hello, All !

I have class
class WsView : public QtCanvasView
{
   Q_OBJECT
   public:
.....
   signals:
       void mouseMove (QMouseEvent *event);
       void mousePress (QMouseEvent *event);
.....
   public slots:
      void mouseMoveEvent (QMouseEvent *event);
      void mousePressEvent (QMouseEvent *event);
...
};

In WsView constructor I make this->setMouseTracking (true) and
this->viewport()->setMouseTracking (true); But event mouseMoveEvent (e);
does not generate. Where is problem ?



You need to reimplement contentsMouseMoveEvent(), not mouseMoveEvent().


I did it, but nothing changed. Any more ideas ?

Best regards,
Yuriy Rusinov.

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