How to calculate qfont pixel size from dot size

How to convert font in QGraphicsObject from dot size to pixel size? I need to do this so that the fonts look correct when I print my QGraphicsScene using QGraphicsScene::render() .

+4
source share
1 answer

The QFontMetrics class will probably do the job. Just create your desired QFont, set its point size. Then create a QFontMetrics object on your QFont.

+7
source

All Articles