[Qt-interest] Iaaue with mouseGrabber
Mystical Rose
mca.meraj at gmail.com
Mon Jul 25 22:13:18 CEST 2011
>> Don't *ever* grab the mouse
<< You are right Bo, that was also my point. But may be Nandita want
to test something or have some special requirements?
Regards,
Meraj Ansari
On Tue, Jul 26, 2011 at 1:35 AM, Bo Thorsen <bo at fioniasoftware.dk> wrote:
> Den 25-07-2011 13:28, nandita-a.mehta at nokia.com skrev:
>> In my application i need to know which widget received the mouse click
>> and for that I am using mouseGrabber().
>
> Don't *ever* grab the mouse. Over 14 years of Qt coding and consulting,
> I have only seen one or two cases where it made sense. It's a clear
> indication you are doing something wrong.
>
> In this case, the solution is to set an event filter on
> QApplication::instance. You can see a similar idea on this page in my blog:
>
> http://www.fioniasoftware.dk/blog/?p=8
>
> You can do exactly the same as this shootabug does, just don't check for
> the ctrl key.
>
> Bo Thorsen,
> Fionia Software.
>
> --
>
> Expert Qt and C++ developer for hire
> Contact me if you need expert Qt help
> http://www.fioniasoftware.dk
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
--
Meraj Ahmad Ansari
S/W Engineer
Aricent Technologies Limited
Gurgaon , India
More information about the Qt-interest-old
mailing list