mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-06-10 18:42:31 -04:00
Don't use deprecated function
This commit is contained in:
parent
ac1f61c3ed
commit
e65baa13d3
@ -4407,16 +4407,16 @@ void GLSpectrum::drawTextsRight(const QStringList &text, const QStringList &valu
|
|||||||
int textWidth, maxWidth;
|
int textWidth, maxWidth;
|
||||||
for (int i = text.length() - 1; i >= 0; i--)
|
for (int i = text.length() - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
textWidth = fm.width(units[i]);
|
textWidth = fm.horizontalAdvance(units[i]);
|
||||||
painter.drawText(QPointF(x - textWidth, y), units[i]);
|
painter.drawText(QPointF(x - textWidth, y), units[i]);
|
||||||
x -= textWidth;
|
x -= textWidth;
|
||||||
|
|
||||||
textWidth = fm.width(value[i]);
|
textWidth = fm.horizontalAdvance(value[i]);
|
||||||
maxWidth = fm.width(max[i]);
|
maxWidth = fm.horizontalAdvance(max[i]);
|
||||||
painter.drawText(QPointF(x - textWidth, y), value[i]);
|
painter.drawText(QPointF(x - textWidth, y), value[i]);
|
||||||
x -= maxWidth;
|
x -= maxWidth;
|
||||||
|
|
||||||
textWidth = fm.width(text[i]);
|
textWidth = fm.horizontalAdvance(text[i]);
|
||||||
painter.drawText(QPointF(x - textWidth, y), text[i]);
|
painter.drawText(QPointF(x - textWidth, y), text[i]);
|
||||||
x -= textWidth;
|
x -= textWidth;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user