From b599774e30f748ff0a3c0532be8b724159bec7c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Thu, 19 Mar 2015 21:25:10 +0100 Subject: [PATCH] Fix a bug that impede to set the trackbar pos using the Qt control panel Conflicts: modules/highgui/src/window_QT.cpp --- modules/highgui/src/window_QT.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/highgui/src/window_QT.cpp b/modules/highgui/src/window_QT.cpp index 70f9e65e07..d0aad919ee 100644 --- a/modules/highgui/src/window_QT.cpp +++ b/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 w = icvFindWindowByName(QLatin1String(name_window)); + QPointer w = icvFindWindowByName(nameWinQt); if (!w) CV_Error(CV_StsNullPtr, "NULL window handler");