From 881e4f307950648facee98be94e7a2840fa549ba Mon Sep 17 00:00:00 2001 From: shijianquan <992593080@qq.com> Date: Wed, 7 May 2025 16:45:56 +0800 Subject: [PATCH] =?UTF-8?q?[M]=E5=A2=9E=E5=8A=A0=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E6=8E=A5=E5=8F=A3=EF=BC=8C=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E5=9C=A8=E8=AE=BE=E7=BD=AE=E6=98=AF=E5=90=A6=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E8=B0=83=E7=94=A8=E5=88=B7=E6=96=B0=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=87=BD=E6=95=B0=E3=80=82=E8=A7=A3=E5=86=B3=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=9A=E4=B8=8B=E6=8B=89=E6=A1=86=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E5=90=8E=EF=BC=8CsetEditable=E5=90=8E?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E9=87=8D=E6=96=B0=E5=8A=A0=E8=BD=BD=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E6=89=8D=E8=83=BD=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/gui/GraphShape/include/CQWidgetWrap.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/platform/src/gui/GraphShape/include/CQWidgetWrap.h b/platform/src/gui/GraphShape/include/CQWidgetWrap.h index cb9a0b34..0b5a4aae 100644 --- a/platform/src/gui/GraphShape/include/CQWidgetWrap.h +++ b/platform/src/gui/GraphShape/include/CQWidgetWrap.h @@ -34,6 +34,14 @@ public slots: { addItem(text, userData); } + + void refreshStyle() + { + this->style()->unpolish(this); + this->style()->polish(this); + this->update(); + } + void insertOneItem(int index, const QString &text, QString userData = "") { insertItem(index, text, userData); @@ -57,6 +65,7 @@ public slots: void setEditabled(bool editable) { setEditable(editable); + refreshStyle(); } QString getCurrentText() { @@ -696,6 +705,13 @@ public: explicit CCheckBox(QWidget *parent = Q_NULLPTR); explicit CCheckBox(const QString &text, QWidget *parent = Q_NULLPTR); +public slots: + void refreshStyle() + { + this->style()->unpolish(this); + this->style()->polish(this); + this->update(); + } protected: virtual bool event(QEvent *e) Q_DECL_OVERRIDE; };