PowerMaster/source/main.cpp

33 lines
919 B
C++
Raw Normal View History

2024-10-10 16:59:51 +08:00
#include "mainWindow.h"
#include <QApplication>
#include <QScreen>
#include <QSysInfo>
2024-10-10 16:59:51 +08:00
int main(int argc, char *argv[])
{
// qreal physicalDPI = 1.0;
// qreal logicalDPI = 1.0;
// QList<QScreen*> listScreen = QGuiApplication::screens();
// for(int n=0; n<listScreen.count(); n++)
// {
// QScreen* screen = listScreen.at(n);
// physicalDPI = screen->physicalDotsPerInch();
// logicalDPI = screen->logicalDotsPerInch();
// int a = 1;
// }
QString osName = QSysInfo::productType();
qDebug() << "Operating System Name:" << osName;
// qputenv("QT_ENABLE_HIGHDPI_SCALING", "1");
// QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
// QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
2024-10-10 16:59:51 +08:00
QApplication a(argc, argv);
MainWindow w;
w.showMaximized();
return a.exec();
}