Opencv 2.4.9 highgui +qt: howto disable menu (right click context)
Hello all,
I'm looking for a way to disable the context menu when right clicking on namedWindow (see http://docs.opencv.org/modules/highgui/doc/qt_new_functions.html for clarification)
The reason is, I want to use the right mouse button for some user interaction but the menu keeps popping up and is therefore disturbing havily.
I also tried to identifiy the part of opencv source code (QT_window.cpp) where the callback function with rightbuttonup is set - as you might guess, unsuccessfully.
Thank you for any help.
Kind regards AR
Just dont build with Qt support or isn't that an option? You can still use the windows but the other functions get isolated, like the right mouse click.
Hi StevenPuttermans and thanks for your reply, unfortunately I'm in need of the Qt enhanced GUI functionalities (like resize window, zoom in/out, take picture). Therefore, building opencv with qt is a must.
Then I am afraid you will need another hotkey than the mouse button :P
Yes, this might be plan B - however, I'm a programmer, this whole software is open source, so In my opinion it has to be possible and it might just be a few loc in need to be commented (i.e. the switch statement which handles the mousrightbuttonclick event triggering the context menu to appear) and my mission will be accomplished :P
That is true :) it is probably possible to find the correct file in the source code.
so I found the appropriate part of code to comment =) Unfortunately, I have to wait until tomorrow until I can answer my own question :D
Ok, do post your solution, since it will help others tackling the same problem.
StevenPuttemans, can you please accept the answer below and close the question? I lack sufficient reputation ;D Of course you can check my solution first.
@AR0x7E7, only you can accept it as solved, but we can upvote it, until you get enough rep. ;)