Unsolved Setting QSS font-size and varying DPIs
-
Hi,
I'm wondering how I should be setting the font-size in QSS so that it works well for monitors of any DPI on Windows.
Currently, I have styles that looks like this:
QLabel { font-size: 12px; }
Because the unit is in pixels, it looks small on high DPI monitors.
Specifying the units using pt makes them look thicker than they should.Is there something I'm missing that might be needed?
Thank you
-
I think pt is the right way.
I feel 9pt looks the same as 12px in normal DPI. -
@Bonnie
I've often struggled with this (in HTML/CSS rather than Qt). Is "always specify your font size inpt
rather thanpx
" a general/successful rule? But then if text has to fit into somewhere like, say, a box specified in pixels, you have headaches again, correct? -
@Bonnie said in Setting QSS font-size and varying DPIs:
the right way.
I feel 9pt looks the sameIt does appear to be the right size but then text looks fuzzy when I switch to using it. I'm not sure how to explain it.
-
@J-Andre
I would imagine specifying inpt
has to scale on a monitor hence the fuzziness, wherepx
would fit exactly?