From bd643ad55088f3bfabd83d8a3a08bab1861e62ef Mon Sep 17 00:00:00 2001 From: Yannick Verdie Date: Sun, 20 Jun 2010 08:44:19 +0000 Subject: [PATCH] New functions with QT GUI: Fixed memory leak Disable QT by default --- CMakeLists.txt | 2 +- modules/highgui/src/window_QT.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 83985f5203..cd3cb6b1a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -496,7 +496,7 @@ endif() ############################### QT ################################ set(HAVE_QT 0) set(HAVE_QT_OPENGL 0) -set(AUTOSWITCH_QT 1)#uses to disable QT +set(AUTOSWITCH_QT 0)#uses to disable QT find_package(Qt4)# QUIET) if (QT4_FOUND AND AUTOSWITCH_QT) diff --git a/modules/highgui/src/window_QT.cpp b/modules/highgui/src/window_QT.cpp index 4171c7f520..140d6c60c0 100755 --- a/modules/highgui/src/window_QT.cpp +++ b/modules/highgui/src/window_QT.cpp @@ -780,7 +780,15 @@ CvWindow::~CvWindow() delete layout; } + + delete shortcutZ; + delete shortcutPlus; + delete shortcutMinus; + delete shortcutLeft; + delete shortcutRight; + delete shortcutUp; + delete shortcutDown; } void CvWindow::displayInfo(QString text,int delayms)