Skip to content

Instantly share code, notes, and snippets.

@shundhammer
Last active May 31, 2021 04:35
Show Gist options
  • Save shundhammer/803faaa6b7eb7662178a561deaaf1d81 to your computer and use it in GitHub Desktop.
Save shundhammer/803faaa6b7eb7662178a561deaaf1d81 to your computer and use it in GitHub Desktop.
Qt HiDPI

Qt and HiDPI

Information Resources

Qt Reference Documentation

Qt Source Code (Qt 5.15.2)

  • qhighdpiscaling.cpp

    Environment variables:

    • QT_DEVICE_PIXEL_RATIO
    • QT_AUTO_SCREEN_SCALE_FACTOR
    • QT_ENABLE_HIGHDPI_SCALING
    • QT_SCALE_FACTOR
    • QT_SCREEN_SCALE_FACTORS
    • QT_SCALE_FACTOR_ROUNDING_POLICY
    • QT_DPI_ADJUSTMENT_POLICY
    • QT_USE_PHYSICAL_DPI

SUSE Patches for libqt5-qtbase

HiDPI Handling in YaST libyui-qt

It's really only this one line:

https://github.com/libyui/libyui/blob/master/libyui-qt/src/YQUI.cc#L158

QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment