Enable Qt 5.14's new fractional DPI scaling
This commit is contained in:
parent
1ae16bb657
commit
879e084383
1 changed files with 6 additions and 0 deletions
|
|
@ -284,8 +284,14 @@ int main(int argc, char *argv[])
|
||||||
AntiHookingDummyImport();
|
AntiHookingDummyImport();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Enable High DPI support
|
||||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||||
|
// Enable fractional High DPI scaling on Qt 5.14 and later
|
||||||
|
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||||
|
#endif
|
||||||
|
|
||||||
// This avoids using the default keychain for SSL, which may cause
|
// This avoids using the default keychain for SSL, which may cause
|
||||||
// password prompts on macOS.
|
// password prompts on macOS.
|
||||||
qputenv("QT_SSL_USE_TEMPORARY_KEYCHAIN", "1");
|
qputenv("QT_SSL_USE_TEMPORARY_KEYCHAIN", "1");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue