QFontMetrics::width() is no longer valid in Qt6
This commit is contained in:
Juergen Spitzmueller 2021-11-02 16:28:40 +01:00
parent 59b8c209c4
commit de637cdbcb

View File

@ -648,7 +648,11 @@ GuiView::GuiView(int id)
zoom_slider_->setToolTip(qt_("Workarea zoom level. Drag, use Ctrl-+/- or Shift-Mousewheel to adjust.")); zoom_slider_->setToolTip(qt_("Workarea zoom level. Drag, use Ctrl-+/- or Shift-Mousewheel to adjust."));
// Buttons to change zoom stepwise // Buttons to change zoom stepwise
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
QSize s(fm.horizontalAdvance('+'), fm.height());
#else
QSize s(fm.width('+'), fm.height()); QSize s(fm.width('+'), fm.height());
#endif
zoom_in_ = new GuiClickableLabel(statusBar()); zoom_in_ = new GuiClickableLabel(statusBar());
zoom_in_->setText("+"); zoom_in_->setText("+");
zoom_in_->setFixedSize(s); zoom_in_->setFixedSize(s);