Merge branch 'yhkylin/v101' of https://gitlab2.kylin.com/kylinos-src/kylin-nm into v101-local

This commit is contained in:
chenxuechao 2023-07-17 10:36:41 +08:00
commit 41b91a94e2
2 changed files with 31 additions and 0 deletions

View File

@ -36,6 +36,7 @@ DetailPage::DetailPage(bool isWlan, bool isCreate, QWidget *parent)
if (isCreate) {
connect(m_SSIDEdit, &LineEdit::textEdited, this, &DetailPage::setEnableOfSaveBtn);
}
setInteractionFlag();
}
DetailPage::~DetailPage()
@ -169,6 +170,35 @@ QPalette DetailPage::getTheme()
return pal;
}
void DetailPage::setInteractionFlag()
{
if (m_SSIDLabel != nullptr) {
m_SSIDLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
m_SSIDLabel->setCursor(Qt::IBeamCursor);
}
//文字部分响应鼠标的可选择状态
m_Protocol->setTextInteractionFlags(Qt::TextSelectableByMouse);
m_SecType->setTextInteractionFlags(Qt::TextSelectableByMouse);
m_Hz->setTextInteractionFlags(Qt::TextSelectableByMouse);
m_Chan->setTextInteractionFlags(Qt::TextSelectableByMouse);
m_BandWidth->setTextInteractionFlags(Qt::TextSelectableByMouse);
m_IPV6->setTextInteractionFlags(Qt::TextSelectableByMouse);
m_IPV4->setTextInteractionFlags(Qt::TextSelectableByMouse);
m_IPV4Dns->setTextInteractionFlags(Qt::TextSelectableByMouse);
m_Mac->setTextInteractionFlags(Qt::TextSelectableByMouse);
//鼠标移入指针变成光标
m_Protocol->setCursor(Qt::IBeamCursor);
m_SecType->setCursor(Qt::IBeamCursor);
m_Hz->setCursor(Qt::IBeamCursor);
m_Chan->setCursor(Qt::IBeamCursor);
m_BandWidth->setCursor(Qt::IBeamCursor);
m_IPV6->setCursor(Qt::IBeamCursor);
m_IPV4->setCursor(Qt::IBeamCursor);
m_IPV4Dns->setCursor(Qt::IBeamCursor);
m_Mac->setCursor(Qt::IBeamCursor);
m_IPV4Dns->setScaledContents(true);
}
void DetailPage::initUI() {
m_layout = new QVBoxLayout(this);
m_layout->setContentsMargins(0,0,0,0);

View File

@ -68,6 +68,7 @@ private:
void addDetailItem(QListWidget *listWidget, QWidget *detailWidget);
void newCopiedTip();
QPalette getTheme();
void setInteractionFlag();
public:
QListWidget *m_listWidget = nullptr;