From: Ilya Lysenkov Date: Mon, 20 Jun 2011 09:49:21 +0000 (+0000) Subject: Qt: fixed signal of a clicked push button (patch #786) X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~6900 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=233dfd252d376ff7711e823aed65a8ccdb6ec462;p=platform%2Fupstream%2Fopencv.git Qt: fixed signal of a clicked push button (patch #786) --- diff --git a/modules/highgui/src/window_QT.cpp b/modules/highgui/src/window_QT.cpp index d97928c..65b50b6 100755 --- a/modules/highgui/src/window_QT.cpp +++ b/modules/highgui/src/window_QT.cpp @@ -1338,8 +1338,11 @@ void CvButtonbar::addButton( QString name, CvButtonCallback call, void* userdata } if (button) - { - QObject::connect( button, SIGNAL( toggled(bool) ),button, SLOT( callCallBack(bool) )); + { + if (button_type == CV_PUSH_BUTTON) + QObject::connect( button, SIGNAL( clicked(bool) ),button, SLOT( callCallBack(bool) )); + else + QObject::connect( button, SIGNAL( toggled(bool) ),button, SLOT( callCallBack(bool) )); addWidget(button,Qt::AlignCenter); } }