[Qt-interest] How to solve grabmouse issue

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Wed Jul 28 15:37:19 CEST 2010


Ramesh wrote on Wednesday, July 28, 2010 3:21 PM:

> Hi,
> 
> I have two graphics item on a scene.. I require grabmouse for one
> graphicsitem, if I do any mouse operation on another graphics item it
> doesn't take mouse events at all..  

Well, that's exactly the idea of "grabbing the mouse": only the "mouse owner" (the one who grabbed the mouse) receives mouse events - unless the mouse is released.

> I will not be having any idea that when user moves to second graphics
> item to ungrab the mouse from first graphics item. 

Well, how should we know what your application requirements are, that is when to release the mouse? That is part of your User Experience(tm) Design(R) (yeah, finally I could use some fancy words here ;)
 
> How to handle this situation.

Re-think your user interaction: maybe the user is required to press "Esc" (Escape) in order to release the mouse and return to normal interaction with your application? That is up to you.

Cheers, Oliver
-- 
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22



More information about the Qt-interest-old mailing list