#include "dialoglogin.h" #include #include #include int main(int argc, char *argv[]) { // 设置高DPI #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QGuiApplication::setAttribute(Qt::AA_ShareOpenGLContexts); #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); #endif #endif QApplication a(argc, argv); a.setStyleSheet("QToolTip { font-size: 18px; font-family: 'SimHei'; }"); DialogLogin loginWidget; loginWidget.setStyleSheet("background-color: #FFFFFF;"); qRegisterMetaType>("QList"); qRegisterMetaType("QAbstractItemModel::LayoutChangeHint"); qRegisterMetaType>("QVector"); loginWidget.show(); return a.exec(); }