QPainter FontMetrics returns different values on the same Graphics view and scene
Unsolved
General and Desktop
-
I have two graphics rect items drawn on the same graphics scene and graphics view. I am rendering text on the rect items for which I take font metrics from the painter to calculate text width and height.
As per observation for other graphics items, the value of painter->fontMetrics->height() and painter->fontMetrics->averageCharWidth() increases in value when moving a screen of low dpi to high dpi.
What could be the issue that painter->fontMetrics() is different for the two graphics items which are drawn in the same manner?
Picture for reference:
Please help.