更新适应ui的尺寸

This commit is contained in:
work-zym\zhangyiming 2024-12-13 16:35:17 +08:00
parent 1f189d8036
commit 1aee19e19e
4 changed files with 15 additions and 10 deletions

View File

@ -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;

Binary file not shown.

View File

@ -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);

View File

@ -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);