diff options
Diffstat (limited to 'spline/spline-widget.cpp')
-rw-r--r-- | spline/spline-widget.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spline/spline-widget.cpp b/spline/spline-widget.cpp index a2f2f0f5..7c92094d 100644 --- a/spline/spline-widget.cpp +++ b/spline/spline-widget.cpp @@ -139,12 +139,14 @@ void spline_widget::drawBackground() const QString text = QString::number(i); + const double width = #if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) - const double width = metrics.horizontalAdvance(text); + metrics.horizontalAdvance(text); #else // XXX remove after Linux upgrades -sh 20181225 - const double width = metrics.width(text); + metrics.width(text); #endif + painter.drawText(QRectF{x - width/2, pixel_bounds.height() + 10 + height, width, height}, |