Get rid of implicit conversion in text input height calculation

This commit is contained in:
Vladyslav Tronko 2019-03-03 20:34:57 +02:00
parent 0c53a87488
commit d2a28072f6

View file

@ -448,8 +448,8 @@ TextInputWidget::TextInputWidget(QWidget *parent)
QFont f; QFont f;
f.setPointSizeF(f.pointSizeF()); f.setPointSizeF(f.pointSizeF());
const int fontHeight = QFontMetrics(f).height(); const int fontHeight = QFontMetrics(f).height();
const int contentHeight = fontHeight * 2.5; const int contentHeight = static_cast<int>(fontHeight * 2.5);
const int InputHeight = fontHeight * 1.5; const int InputHeight = static_cast<int>(fontHeight * 1.5);
setFixedHeight(contentHeight); setFixedHeight(contentHeight);
setCursor(Qt::ArrowCursor); setCursor(Qt::ArrowCursor);