Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

QT5 opencv3.1 ubuntu 16.04 cv::destroyAllWindows

I have a Qt5 Gui app with some camera regulation & transform. For code semplicity I use imshow("mywin", myMatimage) for show every transform used. If all It is as desired, I save the sequence of transformation, convert cv::Mat into QImage and show the image/video onto QT5 gui. All ok but for close thw imshow windows, I must release their matimage (it is all ok again), but after these I must manually close the opencv opened windows because I'm not able to detect and close these.

For sure I can connect a bool var on every imshow command, and when I want to close the windows use an if statement on every bool var ... if(myboolvarMy1imshowWindows){ destroyWindows("windows_myboolvarMy1imshowWindows");}

but there are a more eleegant way to do these?

regards gfx

[Solved] QT5 opencv3.1 ubuntu 16.04 cv::destroyAllWindows

I have a Qt5 Gui app with some camera regulation & transform. For code semplicity I use imshow("mywin", myMatimage) for show every transform used. If all It is as desired, I save the sequence of transformation, convert cv::Mat into QImage and show the image/video onto QT5 gui. All ok but for close thw imshow windows, I must release their matimage (it is all ok again), but after these I must manually close the opencv opened windows because I'm not able to detect and close these.

For sure I can connect a bool var on every imshow command, and when I want to close the windows use an if statement on every bool var ... if(myboolvarMy1imshowWindows){ destroyWindows("windows_myboolvarMy1imshowWindows");}

but there are a more eleegant way to do these?

regards gfx