StyleHelper: Add setter for "panelwidget[_singlerow]"

20 string duplications warrant a centralized setter. A couple more of
them will come with the upcoming toolbar changes.

Change-Id: Ide8c680da21d5be09f968bcc0a774e062c6f0260
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2023-04-21 22:10:24 +02:00
parent 963ae0a192
commit 3821683647
12 changed files with 51 additions and 28 deletions

View File

@@ -49,6 +49,7 @@
#include <utils/fancymainwindow.h>
#include <utils/fileinprojectfinder.h>
#include <utils/qtcassert.h>
#include <utils/stylehelper.h>
#include <utils/url.h>
#include <utils/utilsicons.h>
@@ -197,7 +198,7 @@ QmlProfilerTool::QmlProfilerTool()
this, &QmlProfilerTool::toggleVisibleFeature);
d->m_timeLabel = new QLabel();
d->m_timeLabel->setProperty("panelwidget", true);
StyleHelper::setPanelWidget(d->m_timeLabel);
d->m_timeLabel->setIndent(10);
updateTimeDisplay();
connect(d->m_timeLabel, &QObject::destroyed, &d->m_recordingTimer, &QTimer::stop);