From 8f33e89d46dbd4324a5d04b3954d4227974f59cc Mon Sep 17 00:00:00 2001 From: Yannick Verdie Date: Wed, 28 Jul 2010 21:55:55 +0000 Subject: [PATCH] working on OpenGL for Windows --- CMakeLists.txt | 3 ++- modules/highgui/src/window_QT.cpp | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3802ca214f..7358fb17c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -519,7 +519,8 @@ if (WITH_QT) add_definitions(-DHAVE_QT)#We need to define te macro this way, using cvconfig.h.cmake does not work find_package (OpenGL QUIET) - if (NOT WIN32) #WIN32 always detect OpenGL, so I disabled it. + #if (NOT WIN32) #WIN32 always detect OpenGL, so I disabled it. + if (OPENGL_INCLUDE_DIR) if (QT_QTOPENGL_FOUND AND OPENGL_FOUND) set(HAVE_QT_OPENGL 1) add_definitions(-DHAVE_QT_OPENGL) diff --git a/modules/highgui/src/window_QT.cpp b/modules/highgui/src/window_QT.cpp index 9d904e88ec..4a4ce5787e 100755 --- a/modules/highgui/src/window_QT.cpp +++ b/modules/highgui/src/window_QT.cpp @@ -690,6 +690,9 @@ void GuiReceiver::isLastWindow() GuiReceiver::~GuiReceiver() { + if (global_control_panel) + delete global_control_panel; + delete timer; } @@ -1394,6 +1397,8 @@ CvWindow::CvWindow(QString arg, int arg2) CvWindow::~CvWindow() { + printf("delete w\n"); + QLayoutItem *child; if (myGlobalLayout)