PDA

View Full Version : scale qpainterfont / qfontmetricsf



Cremers
17th October 2012, 14:13
Hello,

I'm working on an app for android with qt and I'm having problems with the font size of qpainter. On my tablet the fontsize is allright but on my phone it's too large. They both have the same resolution but the phone has ~252 ppi and the tablet about half that.
I have looked at qfontmetricsf but I don't understand how I can calculate and set the right fontsize with it.

Thank you.

Cremers
18th October 2012, 11:19
Nevermind, I found QPaintDevice::logicalDpiX which does the trick.