Remove use of QFontMetrics width

This commit is contained in:
Gaute Lindkvist
2019-12-04 15:09:04 +01:00
parent a7e3cc154a
commit 1d62d3534c
2 changed files with 2 additions and 2 deletions
@@ -143,7 +143,7 @@ QWidget* PdmUiColorEditor::createEditorWidget(QWidget * parent)
QFontMetrics fontMetrics = QApplication::fontMetrics();
buttonLayout->addWidget(m_colorPreviewLabel);
m_colorSelectionButton->setMinimumWidth(fontMetrics.width(m_colorPreviewLabel->text()) + 15);
m_colorSelectionButton->setMinimumWidth(fontMetrics.boundingRect(m_colorPreviewLabel->text()).width() + 15);
layout->addWidget(m_colorTextLabel);
layout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Ignored));