[Qt-interest] Restricting specified mouse events
Karol Krizka
kkrizka at gmail.com
Mon May 25 11:41:12 CEST 2009
On Mon, 2009-05-25 at 02:02 -0700, Nitin Mahajan wrote:
> HI!
>
> How can I limit the mouse movement(and hence any events propagation) to a specified rectangular area in a Widget, Screen or Application window?
>
> Alternatively is there a way to disable all mouse activity including basic mouse movement, but except left button click events in an application?
>
You can control the position of a mouse using QCursor::setPos() . So
maybe you could over-write the mouse move event inside your widget and
change the position of the cursor every time it gets outside of your
widget?
--
Cheers,
Karol Krizka
http://www.krizka.net
> Thanks and regards
>
> -Nitin
>
>
> New Email names for you!
> Get the Email name you've always wanted on the new @ymail and @rocketmail.
> Hurry before someone else does!
> http://mail.promotions.yahoo.com/newdomains/aa/
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list