Important: Please read the Qt Code of Conduct -

[Solved] Managing font size at Mac and Windows

  • Hi together,

    the problem is the well known and good described 72dpi at Mac and 96dpi at Windows problem. I have found a lot of discussion to this theme.
    But I have not found a document what describes how can a handle this. I need a description what I have to do that the displayed font has the same high at different systems. Please also cover QML. Is there a global setting in Qt 5.1?
    I'm sure there is a solution but I haven't found it, sorry.


  • I have solved the problem for our application by creating a factor which is used in every font.size declaration.
    This property is computed during the startup of the application by using the logicalDpiY from the QApplication::desktop() parameter.

    @QQuickView viewer;

    The number 72.0dpi is used, because the GUI-Development is made at a MAC.

Log in to reply