判空处理

This commit is contained in:
Jinxujie 2021-12-03 10:48:47 +08:00
parent 0faf6a57cb
commit 9ce3ca215f
1 changed files with 3 additions and 1 deletions

View File

@ -84,7 +84,9 @@ static void setFramePalette(QFrame *widget, QPalette &pal) {
QList<QComboBox *> comboBoxList = widget->findChildren<QComboBox *>();
for (int i = 0; i < comboBoxList.count(); ++i) {
comboBoxList.at(i)->setPalette(pal);
comboBoxList.at(i)->view()->setPalette(pal);
if (comboBoxList.at(i)->view()) {
comboBoxList.at(i)->view()->setPalette(pal);
}
}
}