From 33ba7867f63feee2a8ea524f9805195156d5bfe2 Mon Sep 17 00:00:00 2001 From: saskatchewancatch Date: Thu, 31 Aug 2017 00:40:51 -0600 Subject: [PATCH] Don't truncate label for tracknbar name (Qt) Setting truncate option for QString leftJustified method to false fixes 10 character truncation issue noted in issue 9489 --- modules/highgui/src/window_QT.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/highgui/src/window_QT.cpp b/modules/highgui/src/window_QT.cpp index 420d2a1dc6..4a08edcde4 100644 --- a/modules/highgui/src/window_QT.cpp +++ b/modules/highgui/src/window_QT.cpp @@ -1409,7 +1409,7 @@ void CvTrackbar::update(int myvalue) void CvTrackbar::setLabel(int myvalue) { - QString nameNormalized = name_bar.leftJustified( 10, ' ', true ); + QString nameNormalized = name_bar.leftJustified( 10, ' ', false ); QString valueMaximum = QString("%1").arg(slider->maximum()); QString str = QString("%1 (%2/%3)").arg(nameNormalized).arg(myvalue,valueMaximum.length(),10,QChar('0')).arg(valueMaximum); label->setText(str);