summaryrefslogtreecommitdiffhomepage
path: root/spline
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-12-25 14:57:23 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-12-25 14:57:23 +0100
commit7509b983edb4b95b38089a89305e1d1e988da09b (patch)
tree89776defc39205bd722f8eac792fdaefebfc247f /spline
parent4e62e90beec75f069c5802910111cbf3462e9bd8 (diff)
fix build...
Diffstat (limited to 'spline')
-rw-r--r--spline/spline-widget.cpp6
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},