Fix a bug that impede to set the trackbar pos using the Qt control panel

Conflicts:
	modules/highgui/src/window_QT.cpp
pull/3966/head
Luis Díaz Más 10 years ago committed by Dikay900
parent e6f7e96ff4
commit b599774e30
  1. 6
      modules/highgui/src/window_QT.cpp

@ -418,12 +418,14 @@ static CvBar* icvFindBarByName(QBoxLayout* layout, QString name_bar, typeBar typ
static CvTrackbar* icvFindTrackBarByName(const char* name_trackbar, const char* name_window, QBoxLayout* layout = NULL)
{
QString nameQt(name_trackbar);
if ((!name_window || !name_window[0]) && global_control_panel) //window name is null and we have a control panel
QString nameWinQt(name_window);
if (nameWinQt.isEmpty() && global_control_panel) //window name is null and we have a control panel
layout = global_control_panel->myLayout;
if (!layout)
{
QPointer<CvWindow> w = icvFindWindowByName(QLatin1String(name_window));
QPointer<CvWindow> w = icvFindWindowByName(nameWinQt);
if (!w)
CV_Error(CV_StsNullPtr, "NULL window handler");

Loading…
Cancel
Save