Hi Marc, 

Have a look at QWidget.setMouseTracking. 

Tony.


> Sent: Friday, 16 March 2012 2:52 AM
> 
> Hi,
> 
> Quick question about QGraphicsScene::mouseMoveEvent(...):
> 
> I only receive a mouse move event when the left mouse button is pressed.
> For example, this code:
> 
> void MyScene::mouseMoveEvent(QGraphicsSceneMouseEvent *event) {
>    qDebug() << "Scene mouse move event";
>    if (!something)
>    {
>       QGraphicsScene::mouseMoveEvent(event);
>       return;
>    }
> 
>    // Do somehting each time the mouse moves over the scene rect.
> }
> 
> prints "Scene mouse move event" only when I press the left mouse button
> and move the mouse.
> 
> Is this normal behavior? Should I reimplement the mouseMoveEvent from
> QGraphicsView instead? This is kinda strange...
> 
> Regards,
> 
> Marc


_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to