Hello Andreas,

Andreas Aardal Hanssen wrote:
I don't know why it would happen for you, but here's something you can do to
check if it Qt or Windows that's sending those excessive events:

In qapplication_win.cpp, you'll find a function called
bool QETWidget::translateMouseEvent(const MSG &msg)

around line 2800. You can insert debug info/a break point there to track
when Windows sends a mouse move event to Qt. Then you can compare that to
how many events are delivered to QGraphicsView::mouseMoveEvent. If the
match is 1-1, then the problem is outside Qt, but if it's 1:many, it's
inside Qt.

Andreas :-)


I have found the same behavior on Linux, so Windows in itself can be eliminated.

So the result till now:

  - dragging with a mouse is Okay in Qt-4.3.x (both Windows/Linux,
    my modified collidingmice example, view.setDragMode(QGraphicsView::NoDrag))

  - dragging with a mouse doesn't function in Qt-4.4.x (both Windows/Linux
    my modified collidingmice example, view.setDragMode(QGraphicsView::NoDrag))

  - dragging (NATIVE) with left mouse button is Okay in Qt-4.4.x (both 
Windows/Linux,
    original collidingmice example, 
view.setDragMode(QGraphicsView::ScrollHandDrag))


Typical output I see from the modified collidingmice example (in Qt-4.4.0):
generated with
qDebug() << event->pos() << mapFromGlobal(event->globalPos()) << 
event->globalPos()

// Press mouse button
GraphicsView: mousePressEvent: QPoint(159,163) QPoint(161,165) QPoint(1038,839)

// Hold mouse button and move the mouse ONE pixel along X-axis to the origin
GraphicsView: mouseMoveEvent: QPoint(158,163) QPoint(160,165) QPoint(1037,839)
GraphicsView: mouseMoveEvent: QPoint(159,163) QPoint(161,165) QPoint(1038,839)
GraphicsView: mouseMoveEvent: QPoint(159,163) QPoint(161,165) QPoint(1038,839)

// Release mouse button
GraphicsView: mouseReleaseEvent


Maybe you could take a look at my modified collidingmice example once more and
give me a tip what was introduced by transition Qt-4.3.4 -> Qt-4.4.0 that
break our code ?

Thanks
Albert

To unsubscribe - send "unsubscribe" in the subject to [EMAIL PROTECTED]

Reply via email to