mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-23 20:22:58 +03:00
Update lrchartitem.cpp
Qt6.2.4 has no width() to be use boundingrect().width()
This commit is contained in:
parent
56b2a11b8a
commit
ffe04642f8
@ -1022,14 +1022,14 @@ void AbstractSeriesChart::paintGrid(QPainter *painter, QRectF gridRect)
|
||||
if (m_chartItem->horizontalAxisOnTop()) {
|
||||
painter->drawLine(x, gridRect.top() - gridOffset.height(),
|
||||
x, (drawFullLine ? gridRect.bottom() : gridRect.top()));
|
||||
painter->drawText(QRectF(x - painter->fontMetrics().width(text) / 2,
|
||||
painter->drawText(QRectF(x - painter->fontMetrics().boundingRect(text).width() / 2,
|
||||
gridRect.top() - (fontHeight + gridOffset.height()),
|
||||
hStep, fontHeight),
|
||||
text);
|
||||
} else {
|
||||
painter->drawLine(x, gridRect.bottom() + gridOffset.height(),
|
||||
x, (drawFullLine ? gridRect.top() : gridRect.bottom()));
|
||||
painter->drawText(QRectF(x - painter->fontMetrics().width(text) / 2,
|
||||
painter->drawText(QRectF(x - painter->fontMetrics().boundingRect(text).width() / 2,
|
||||
gridRect.bottom() + halfFontHeight * 0 + gridOffset.height(),
|
||||
hStep, fontHeight),
|
||||
text);
|
||||
|
Loading…
Reference in New Issue
Block a user