Qt 代码优化:如何启用高 DPI 缩放 (AA_EnableHighDpiScaling)
这行代码通常放在 main 函数的开头位置,即在创建 QApplication 对象之前。例如:\n\nint main(int argc, char *argv[])\n{\n\tQCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);\n\n\tQApplication app(argc, argv);\n\t// ...\n\treturn app.exec();\n}
AI 优化版
原文地址:https://www.cveoy.top/t/topic/pETG 著作权归作者所有。请勿转载和采集!