Commit 233dfd25 authored by Ilya Lysenkov's avatar Ilya Lysenkov

Qt: fixed signal of a clicked push button (patch #786)

parent 3c7055b9
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment