diff --git a/plugins/component/AddBtn/addnetbtn.cpp b/plugins/component/AddBtn/addnetbtn.cpp index e47ea2dc..811a0c99 100644 --- a/plugins/component/AddBtn/addnetbtn.cpp +++ b/plugins/component/AddBtn/addnetbtn.cpp @@ -84,7 +84,7 @@ void AddNetBtn::paintEvent(QPaintEvent *event) QPainter painter(this); painter.setRenderHint(QPainter:: Antialiasing, true); //设置渲染,启动反锯齿 painter.setPen(Qt::NoPen); - painter.setBrush(pal.color(QPalette::Base)); + painter.setBrush(this->palette().base().color()); QColor color = pal.color(QPalette::Button); color.setAlphaF(0.5); diff --git a/plugins/netconnect/lanitem.cpp b/plugins/netconnect/lanitem.cpp index 60be4130..2df49237 100644 --- a/plugins/netconnect/lanitem.cpp +++ b/plugins/netconnect/lanitem.cpp @@ -94,7 +94,7 @@ void LanItem::paintEvent(QPaintEvent *event) QPainter painter(this); painter.setRenderHint(QPainter:: Antialiasing, true); //设置渲染,启动反锯齿 painter.setPen(Qt::NoPen); - painter.setBrush(pal.color(QPalette::Base)); + painter.setBrush(this->palette().base().color()); QColor color = pal.color(QPalette::Button); color.setAlphaF(0.5); diff --git a/plugins/wlanconnect/wlanitem.cpp b/plugins/wlanconnect/wlanitem.cpp index aff3c0d6..539e454c 100644 --- a/plugins/wlanconnect/wlanitem.cpp +++ b/plugins/wlanconnect/wlanitem.cpp @@ -96,7 +96,7 @@ void WlanItem::paintEvent(QPaintEvent *event) QPainter painter(this); painter.setRenderHint(QPainter:: Antialiasing, true); //设置渲染,启动反锯齿 painter.setPen(Qt::NoPen); - painter.setBrush(pal.color(QPalette::Base)); + painter.setBrush(this->palette().base().color()); QColor color = pal.color(QPalette::Button); color.setAlphaF(0.5);