QT6: No Qt::AA_EnableHighDpiScaling in QT6

This commit is contained in:
Simon De Backer
2020-10-03 16:08:55 +02:00
parent 9a915c2ad0
commit 9f3c173b9f

View File

@@ -30,8 +30,8 @@
@param msg : Message
*/
void myMessageOutput(QtMsgType type,
const QMessageLogContext &context,
const QString &msg)
const QMessageLogContext &context,
const QString &msg)
{
QString txt=QTime::currentTime().toString("hh:mm:ss.zzz");
@@ -110,8 +110,8 @@ void myMessageOutput(QtMsgType type,
txt+=")\n";
}
QFile outFile(QETApp::configDir()
+QDate::currentDate().toString("yyyyMMdd")
+".log");
+QDate::currentDate().toString("yyyyMMdd")
+".log");
if(outFile.open(QIODevice::WriteOnly | QIODevice::Append))
{
QTextStream ts(&outFile);
@@ -166,7 +166,13 @@ int main(int argc, char **argv)
QCoreApplication::setApplicationName("QElectroTech");
//Creation and execution of the application
//HighDPI
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#else
#if TODO_LIST
#pragma message("@TODO remove code for QT 6 or later")
#endif
#endif
SingleApplication app(argc, argv, true);
#ifdef Q_OS_MACOS
//Handle the opening of QET when user double click on a .qet .elmt .tbt file