From 3a6688f5dba3cb8b22180f53ec4e6c7f3b4f57af Mon Sep 17 00:00:00 2001 From: Arseniy-Movshev Date: Tue, 30 May 2023 14:00:29 +0100 Subject: Make graph points round --- qmlplugin/hrGraph.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qmlplugin/hrGraph.cpp') diff --git a/qmlplugin/hrGraph.cpp b/qmlplugin/hrGraph.cpp index d73cbcd..0ecb39c 100644 --- a/qmlplugin/hrGraph.cpp +++ b/qmlplugin/hrGraph.cpp @@ -63,6 +63,8 @@ void HrGraph::paint(QPainter *painter) points[i] = QPointF(m_lineWidth + calculatedTimeSeconds*(width()-2*m_lineWidth), m_lineWidth + calculatedValue*(height()-2*m_lineWidth)); //these +2 -1 are here to make sure that the graph fits within the drawn area, as it will be clipped by qt if it doesn't. } QPen pen; + pen.setCapStyle(Qt::RoundCap); + pen.setJoinStyle(Qt::RoundJoin); pen.setWidthF(m_lineWidth); pen.setColor(m_color); painter->setRenderHints(QPainter::Antialiasing); -- cgit v1.2.3-54-g00ecf