!84 fix plymouth tips error

Merge pull request !84 from likehomedream/plymouthshow
This commit is contained in:
KevinDuan 2023-12-21 02:23:10 +00:00 committed by Gitee
commit 385c456e61
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 8 additions and 2 deletions

View File

@ -147,11 +147,17 @@ void PlymouthThemeWidget::initEditWidget()
}); });
QLabel *tipLabel = new QLabel(); QLabel *tipLabel = new QLabel();
tipLabel->setText("<html>大小不超过10MB<br>格式MP4</html>"); tipLabel->setText("<html>大小不超过10MB<br>格式MP4</html>");
connect(btngroup, QOverload<QAbstractButton*>::of(&QButtonGroup::buttonClicked), [=](QAbstractButton* button) {
if (button == pic) {
tipLabel->setText("<html>大小不超过20KB<br>格式PNG</html>");
} else {
tipLabel->setText("<html>大小不超过10MB<br>格式MP4</html>");
}
});
showLayout->addWidget(defaultLabel); showLayout->addWidget(defaultLabel);
showLayout->addWidget(m_customLabel); showLayout->addWidget(m_customLabel);
showLayout->addWidget(addButton); showLayout->addWidget(addButton);
showLayout->addStretch(1); // showLayout->addStretch(1);
showLayout->addWidget(tipLabel); showLayout->addWidget(tipLabel);
showWidget->setLayout(showLayout); showWidget->setLayout(showLayout);