Nominate our 2022 Qt Champions!

Font Size problem on 4k monitor

  • I'm having a problem with font sizes in my Application's web view. As an example, here are 3 captures for our home page. Top one is the WebEngineView via the SimpleBrowser sample app. Second one is Firefox and bottom one is Chrome. You'll note the top one is a little bigger than the other two:


    I have scaling set to the recommended 150%.

    My JavaScript guy tells me that it reports devicePixelRatio as 2.0, while Firefox says 1.5. But now we've noticed a caveat that says "The Qt platform plugins round the reported scale factors to the nearest integer." so that's probably not it.

    I can set the zoom factor to .8 to get closer to the right size, but then I have to check to see if I'm on a high DPMI monitor or not, and track it if the window moves to an HD monitor (where the size is correct). Ugh. Any other ideas? QA is complaining about it.


Log in to reply