2024-10-10 16:59:51 +08:00
|
|
|
#include "mainWindow.h"
|
|
|
|
|
|
|
|
|
|
#include <QApplication>
|
|
|
|
|
#include <QScreen>
|
2024-11-20 16:57:26 +08:00
|
|
|
#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;
|
|
|
|
|
// }
|
|
|
|
|
|
2024-11-20 16:57:26 +08:00
|
|
|
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();
|
|
|
|
|
}
|