diff options
author | hjk <hjk@qt.io> | 2018-09-06 17:45:59 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2018-09-10 09:41:33 +0000 |
commit | e79bbc8bde39195fdfdff726658c5a98467fa8d2 (patch) | |
tree | 9de80cb39fbd15dbbaf0dc0aef050e3a4d562486 | |
parent | 3abaf647d0c632a4dfcb00d9ad2d1ffe66e014d9 (diff) | |
download | qt-creator-e79bbc8bde39195fdfdff726658c5a98467fa8d2.tar.gz |
ProjectExplorer: Fix string aspects with pixmaps in labels
Amends 0a265ce2. The feature was not used so far.
Change-Id: I6c61341aa5775db8edda66bafc557ff532508250
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
-rw-r--r-- | src/plugins/projectexplorer/runconfigurationaspects.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/runconfigurationaspects.cpp b/src/plugins/projectexplorer/runconfigurationaspects.cpp index eb9b2d183c..11c48560f6 100644 --- a/src/plugins/projectexplorer/runconfigurationaspects.cpp +++ b/src/plugins/projectexplorer/runconfigurationaspects.cpp @@ -413,7 +413,9 @@ void BaseStringAspect::addToConfigurationLayout(QFormLayout *layout) QWidget *parent = layout->parentWidget(); m_label = new QLabel(parent); m_label->setTextInteractionFlags(Qt::TextSelectableByMouse); - m_label->setPixmap(m_labelPixmap); + m_label->setText(m_labelText); + if (!m_labelPixmap.isNull()) + m_label->setPixmap(m_labelPixmap); auto hbox = new QHBoxLayout; switch (m_displayStyle) { @@ -471,8 +473,11 @@ void BaseStringAspect::update() if (m_labelDisplay) m_labelDisplay->setText(displayedString); - if (m_label) + if (m_label) { m_label->setText(m_labelText); + if (!m_labelPixmap.isNull()) + m_label->setPixmap(m_labelPixmap); + } } void BaseStringAspect::makeCheckable(const QString &checkerLabel, const QString &checkerKey) |