QT 禁止DPI 缩放

QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling);

if (qgetenv("QT_FONT_DPI").isEmpty())

{

qputenv("QT_FONT_DPI", "96");

qputenv("QT_SCALE_FACTOR", "1.0");

}

你可能感兴趣的:(c++,QT,C++,qt,dpi)