Disable X close button of cv2.window
I m displaying certain frames from a microscope in a cv2.window ( in Python) but problems could appear if the users try to close the window i Is there any way to disable or hide the X close button in the right top corner from a cv2.window, or at least changing its behavior so nothing happens with the window when clicked?
PS: I am using Windows 10, Python 3.6 and OpenCV 4.3.0
Do u meant close window or grayed out X button?
I want to grey out or disable or make disappear the X button in the right corner of the window when the video is displaying
Not in OpenCV. U can do in GUI such as python, Qt, etc.
but if I try to close the window with the button the window will remain always open? it can be only closed with keys via waitkey?
This will close window. Put this at the bottom
cv2.destroyAllWindows()
Example, When u press q on keyboard. It will close window.: