Hi again, Albert,

Albert Zhykhar wrote:
> Andreas Aardal Hanssen wrote:
>> If you can post all sources to your modified collidingmice example, maybe
>> I can reproduce it and help from there. I suspect there may be changes in
>> there that I'm not aware of ;-).
> Aaah! I see now.
> Here is the complete source code of my modified collidingmice example.
> Actually only main.cpp differs, that's why I published only this one
> in my first(or second) post. The code works in Qt-4.3.4 as expected
> (dragging with the middle mouse button being pressed).

I see the problem now; your code is triggering the mouse replay mechanism in
QGraphicsView. When you scroll or transform the view, if the mouse is over
the view, the view replays the mouse event to ensure that cursors and hover
states are kept up to date. When you drag, this doesn't work well because
the mouse position and scrolling delta are out of sync.

You can work around the problem by temporarily setting
QGraphicsView::setInteractive(false) while you're dragging (set it to false
in mousePressEvent() and true in mouseReleaseEvent()).

I've created a task for fixing this; in the mean time I hope the workaround
will be fine.

-- 
Andreas Aardal Hanssen
Senior Software Engineer, Team Lead / Widgets
Trolltech ASA - Sandakerveien 116, NO-0484 Oslo, Norway

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

Reply via email to