Dear Everyone!
How a way I can disable mouse for a definite period?
or
Any way is possible in Qt to disable mouse port (communication port or usb port) logically(programatically)?
Thanking in advance!
Dear Everyone!
How a way I can disable mouse for a definite period?
or
Any way is possible in Qt to disable mouse port (communication port or usb port) logically(programatically)?
Thanking in advance!
Anurag Shukla
A man who never makes mistake is the man who never does anything! Theodre Rosvelt!
No, Qt does not provide support for such. Why would you like to do so?
J-P Nurmi
You can grab the mouse (QWidget::grabMouse()) and ignore all mouse events you receive. Don't forget to release the mouse afterwards or your system becomes unusable.
bhs-ittech (7th March 2008)
I am creating one parent widget & three child QX11EmbedContainer widget.
In first child widget I am embedding GTK application in QX11EmbedContainer. When I am grabbing mouse, It grabs the mouse only for second & third widgets. but not in First widget.
This is the reason I want to disable mouse port when I showing the widget & when I close the widget enable the port.
Is it possible in Qt.
I am knowing to do this in windows using interrupt handling?
but How a way it can be implemented in Linux FC6 using pure C/C++ programming if it is not possible in Qt.
Anurag Shukla
A man who never makes mistake is the man who never does anything! Theodre Rosvelt!
Well, mouse cursor can bi hidden with bios service 33h. Function code is 2. That means:
will hide mouse cursor and disable mouse, regardless of port. This method is way low level, but efficent.
Qt 5.3 Opensource & Creator 3.1.2
This approach work on all pc computers, regardless of operating system. However, I think you must write assembler program and to "touch" bios you must be careful because you are turning to kernel mode.
Qt 5.3 Opensource & Creator 3.1.2
From my experience, the mouse is disabled if this bios function is called. I've done it and it worked in good old DOS.
Qt 5.3 Opensource & Creator 3.1.2
What do you need the functionality for? If you want to do it on Linux, you have to have superuser privileges, otherwise forget it, it won't work. I don't know why it doesn't work when you grab the mouse, maybe it grabs the pointer only within the current application and your GTK widget is another application. In that case you need an appropriate Xlib call to grab the mouse for the whole desktop or filter out mouse events that are received by the server.
I didn't say such a call exists. But studying Xlib manual might be a good place to start looking for a solution.
Bookmarks