Enable Qt::AA_EnableHighDpiScaling and fix print bug, thanks Gabberworld for this patch.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5242 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2018-02-19 16:28:54 +00:00
parent 0cb5de3ea3
commit 1df3e12349
5 changed files with 23 additions and 39 deletions

View File

@@ -32,14 +32,10 @@ int main(int argc, char **argv)
QCoreApplication::setApplicationName("QElectroTech");
//Creation and execution of the application
//HighDPI
#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);
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#else
qputenv("QT_DEVICE_PIXEL_RATIO", QByteArray("1"));
#endif
qputenv("QT_DEVICE_PIXEL_RATIO", QByteArray("auto"));
#endif
return(QETApp(argc, argv).exec());
}