Qt High DPI

Source: Internet
Author: User

Http://doc.qt.io/qt-5/highdpi.html

Qt Support
    • Ability to provide pixmaps or artwork for high Resolution:see Drawing High resolution Versions of Pixmaps and Images.
    • Qt 5.4 introduces experimental support for scaling by-device pixel ratio similar to OS X to the platform plugins for Wi Ndows and Unix (XCB). This was controlled by the environment variable QT_DEVICE_PIXEL_RATIO . It can be set to a numerical value to being used as scale factor or "auto" which causes the scale factor to being determined by C Hecking the monitor size.

      It's recommended to use the Fusion style.

Migration of Existing applications

In order to get the application designed for low DPI values running on a high resolution monitors quickly, consider one of The scaling options (let the application run as DPI unaware on Windows or set the environment variable to QT_DEVICE_PIXEL_RATIO c2/>. These options may incur some scaling or painting artifacts, though.

In the longer term, the application should is adapted to run unmodified:

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

Qt High DPI

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.