mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
highgui: add property WND_PROP_VISIBLE
checks whether the window exists and is visible. On QT closing a window merley hides it, so the common hack for checking whether a window exists exists = cv2.getWindowProperty(.., 0) >= 0 does not work.
This commit is contained in:
@@ -153,6 +153,14 @@ CV_IMPL double cvGetWindowProperty(const char* name, int prop_id)
|
||||
#endif
|
||||
break;
|
||||
|
||||
case CV_WND_PROP_VISIBLE:
|
||||
#if defined (HAVE_QT)
|
||||
return cvGetPropVisible_QT(name);
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user