Home > Software engineering >  How to scale Qt widgets with automatic layout on hight DPI screen?
How to scale Qt widgets with automatic layout on hight DPI screen?

Time:09-18

I want to follow the long-term path as stated in enter image description here

from Doc that you mentioned it says that:

In the long term, the application should be adapted to run unmodified:

  • Always use the qreal versions of the QPainter drawing API.
  • Size windows and dialogs in relation to the corresponding screen size.
  • Replace hard-coded sizes in layouts and drawing code with values calculated from font metrics or screen size.

means that you should follow that 3 suggestions

means that you can calculate the size by yourself. (hard-coded) In my experience, I never have an issue with scale when I use layout on different devices or monitors.

I need to know what you see on your screen and what expect to be.

  • Related