diff --git a/bin/defaultstyle.qss b/bin/defaultstyle.qss index b466b95..5de13da 100644 --- a/bin/defaultstyle.qss +++ b/bin/defaultstyle.qss @@ -1,12 +1,15 @@ -QPushButton#systemsetting{border-image:url(:/image/index_bg_setting_char.png);} - QPushButton#systemsetting:hover{border-image:url(:/image/index_bg_setting_hover.png);} - QPushButton#systemsetting:pressed{border-image:url(:/image/index_bg_setting_checked.png);} -QPushButton#egg{border-image:url(:/image/index_bg_EEG_char.png);} - QPushButton#egg:hover{border-image:url(:/image/index_bg_EEG_hover.png);} - QPushButton#egg:pressed{border-image:url(:/image/index_bg_EEG_checked.png);} -QPushButton#dataprocess{border-image:url(:/image/index_bg_data_char.png);} - QPushButton#dataprocess:hover{border-image:url(:/image/index_bg_data_hover.png);} - QPushButton#dataprocess:pressed{border-image:url(:/image/index_bg_data_checked.png);} +QPushButton#systemsetting{background-image:url(:/image/index_bg_setting_char.png);width: 1012.79px; +height: 1014.27px;} + QPushButton#systemsetting:hover{background-image:url(:/image/index_bg_setting_hover.png);} + QPushButton#systemsetting:pressed{background-image:url(:/image/index_bg_setting_checked.png);} +QPushButton#egg{background-image:url(:/image/index_bg_EEG_char.png);width: 1012.79px; +height: 1014.27px;} + QPushButton#egg:hover{background-image:url(:/image/index_bg_EEG_hover.png);} + QPushButton#egg:pressed{background-image:url(:/image/index_bg_EEG_checked.png);} +QPushButton#dataprocess{background-image:url(:/image/index_bg_data_char.png);width: 1012.79px; +height: 1014.27px;} + QPushButton#dataprocess:hover{background-image:url(:/image/index_bg_data_hover.png);} + QPushButton#dataprocess:pressed{background-image:url(:/image/index_bg_data_checked.png);} QLineEdit { border: 1px solid #ABCDA0; diff --git a/bin/xyylMCWEACSystem.exe b/bin/xyylMCWEACSystem.exe index ffe69ad..3066fb1 100644 Binary files a/bin/xyylMCWEACSystem.exe and b/bin/xyylMCWEACSystem.exe differ diff --git a/xyylMCWEACSystem/main.cpp b/xyylMCWEACSystem/main.cpp index 57cf386..1934dec 100644 --- a/xyylMCWEACSystem/main.cpp +++ b/xyylMCWEACSystem/main.cpp @@ -27,6 +27,7 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); //qInstallMessageHandler(MessageHandler); QTextCodec *codec = QTextCodec::codecForName("GBK"); QTextCodec::setCodecForLocale(codec); diff --git a/xyylMCWEACSystem/mainwindow.cpp b/xyylMCWEACSystem/mainwindow.cpp index b170ddd..17ebaf8 100644 --- a/xyylMCWEACSystem/mainwindow.cpp +++ b/xyylMCWEACSystem/mainwindow.cpp @@ -59,7 +59,7 @@ void MainWindow::initLay() "QPushButton:hover{border-image:url(:/image/index_bg_data_hover.png);}" "QPushButton:pressed{border-image:url(:/image/index_bg_data_checked.png);}" ); -#endif + m_btnSystemSetting.setMaximumSize(QSize(400,300)); m_btnEEG.setMaximumSize(QSize(400,300)); m_btnDataProcess.setMaximumSize(QSize(400,300)); @@ -68,6 +68,7 @@ void MainWindow::initLay() m_btnSystemSetting.setMinimumSize(QSize(300,200)); m_btnEEG.setMinimumSize(QSize(300,300)); m_btnDataProcess.setMinimumSize(QSize(300,300)); +#endif m_btnSystemSetting.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); m_btnEEG.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);