详情页UI
This commit is contained in:
parent
bceddecb20
commit
0faf6a57cb
|
@ -2,6 +2,9 @@
|
||||||
#define CONINFO_H
|
#define CONINFO_H
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <QPalette>
|
||||||
|
#include <QComboBox>
|
||||||
|
#include <QAbstractItemView>
|
||||||
#include "kywirelessnetitem.h"
|
#include "kywirelessnetitem.h"
|
||||||
#include "kylinconnectresource.h"
|
#include "kylinconnectresource.h"
|
||||||
#include "kylinactiveconnectresource.h"
|
#include "kylinactiveconnectresource.h"
|
||||||
|
@ -72,4 +75,17 @@ static void setLineEditMenuPolicy(QFrame *widget) {
|
||||||
lineEditList.at(i)->setContextMenuPolicy(Qt::NoContextMenu);
|
lineEditList.at(i)->setContextMenuPolicy(Qt::NoContextMenu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void setFramePalette(QFrame *widget, QPalette &pal) {
|
||||||
|
QList<QLineEdit *> lineEditList = widget->findChildren<QLineEdit *>();
|
||||||
|
for (int i = 0; i < lineEditList.count(); ++i) {
|
||||||
|
lineEditList.at(i)->setPalette(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif // CONINFO_H
|
#endif // CONINFO_H
|
||||||
|
|
|
@ -120,6 +120,12 @@ void NetDetail::onPaletteChanged()
|
||||||
|
|
||||||
this->setPalette(pal);
|
this->setPalette(pal);
|
||||||
|
|
||||||
|
setFramePalette(detailPage, pal);
|
||||||
|
setFramePalette(ipv4Page, pal);
|
||||||
|
setFramePalette(ipv6Page, pal);
|
||||||
|
setFramePalette(securityPage, pal);
|
||||||
|
setFramePalette(createNetPage, pal);
|
||||||
|
|
||||||
QPalette listwidget_pal(detailPage->m_listWidget->palette());
|
QPalette listwidget_pal(detailPage->m_listWidget->palette());
|
||||||
listwidget_pal.setColor(QPalette::Base, this->palette().base().color());
|
listwidget_pal.setColor(QPalette::Base, this->palette().base().color());
|
||||||
listwidget_pal.setColor(QPalette::AlternateBase, this->palette().alternateBase().color());
|
listwidget_pal.setColor(QPalette::AlternateBase, this->palette().alternateBase().color());
|
||||||
|
|
Loading…
Reference in New Issue