Skip to content
Snippets Groups Projects
Commit d26a75e4 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

silence Qt warning - QFontMetric.width() => QFontMetric.horizontalAdvance()

parent 825e6614
No related branches found
No related tags found
No related merge requests found
......@@ -1071,7 +1071,7 @@ void DataViewerPanelBase::draw_pixel_values(QPainter& painter)
unsigned char rgb = (rv>130.0) ? 0 : 255;
painter.setPen(QColor(rgb,rgb,rgb));
int string_h=painter.fontMetrics().height();
int string_w=painter.fontMetrics().width(value_string);
int string_w=painter.fontMetrics().horizontalAdvance(value_string);
painter.drawText(p.x() - string_w/2, p.y() + string_h/2, value_string);
}
}
......@@ -1087,7 +1087,7 @@ void DataViewerPanelBase::draw_pixel_values(QPainter& painter)
unsigned char rgb = (rv>130.0) ? 0 : 255;
painter.setPen(QColor(rgb,rgb,rgb));
int string_h=painter.fontMetrics().height();
int string_w=painter.fontMetrics().width(value_string);
int string_w=painter.fontMetrics().horizontalAdvance(value_string);
painter.drawText(p.x() - string_w/2, p.y() + string_h/2, value_string);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment