[Qt-interest] QMainWindow: Prevent mouse from leaving.

R. Reucher rene.reucher at batcom-it.net
Tue Oct 27 16:25:56 CET 2009


On Tue, 27 Oct 2009 16:20:16 +0100, Martin Guillon wrote:
> I have an application which aim is to change the volume as you move your
> mouse.if you go up it will raise the volume ... My problem is that I
> don't want the mouse to leave the application window until we quit the
> application(let s say with ESC). I don't see anything to do that in QT.
> I have the windows clip cursor function but it's not cross plateform.
> 
> Does anyone has any on how to do that in QT? or even with a code that
> would be cross-plateform?
I guess this should help:

http://qt.nokia.com/doc/4.5/qwidget.html#grabMouse
http://qt.nokia.com/doc/4.5/qwidget.html#releaseMouse

HTH, René
-- 
René Reucher
rene.reucher at batcom-it.net
http://www.batcom-it.net/



More information about the Qt-interest-old mailing list