mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 22:00:35 +01:00
Re enable HDPI for macOS
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4966 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -31,10 +31,15 @@ int main(int argc, char **argv)
|
|||||||
QCoreApplication::setOrganizationDomain("qelectrotech.org");
|
QCoreApplication::setOrganizationDomain("qelectrotech.org");
|
||||||
QCoreApplication::setApplicationName("QElectroTech");
|
QCoreApplication::setApplicationName("QElectroTech");
|
||||||
//Creation and execution of the application
|
//Creation and execution of the application
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5,6,0)
|
//HighDPI
|
||||||
QApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 6, 0)
|
||||||
|
#if defined Q_OS_MAC
|
||||||
|
QApplication::setAttribute (Qt::AA_EnableHighDpiScaling);
|
||||||
|
#elif !defined(Q_OS_MAC)
|
||||||
|
QApplication::setAttribute (Qt::AA_DisableHighDpiScaling);
|
||||||
#else
|
#else
|
||||||
qputenv("QT_DEVICE_PIXEL_RATIO", QByteArray("1"));
|
qputenv("QT_DEVICE_PIXEL_RATIO", QByteArray("1"));
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
return(QETApp(argc, argv).exec());
|
return(QETApp(argc, argv).exec());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user