Warnings removed

This commit is contained in:
Bertrand Songis
2019-08-12 14:54:16 +02:00
parent abe1f843c1
commit 75a5dfef24
4 changed files with 19 additions and 15 deletions
@@ -290,7 +290,11 @@ QWidget * RadioOutputsWidget::createLogicalSwitch(QWidget * parent, int switchNo
QFont font = swtch->font();
font.setBold(true);
swtch->setFont(font);
#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
swtch->setMinimumWidth(swtch->fontMetrics().width("99") + 10);
#else
swtch->setMinimumWidth(swtch->fontMetrics().horizontalAdvance("99") + 10);
#endif
font.setBold(false);
swtch->setFont(font);
swtch->setText(QString("%1").arg(switchNo+1, 2, 10, QChar('0')));