From 932e1450c2a0190928a373d5335e18e9f7de6585 Mon Sep 17 00:00:00 2001 From: Krad Date: Tue, 31 May 2022 09:45:08 +0800 Subject: [PATCH] Fix imageswitch icon bug. --- src/components/imageswitch.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/imageswitch.h b/src/components/imageswitch.h index f1f09d2..4db820b 100644 --- a/src/components/imageswitch.h +++ b/src/components/imageswitch.h @@ -26,7 +26,8 @@ public: enum ButtonStyle { ButtonStyle_1 = 0, //开关样式1 ButtonStyle_2 = 1, //开关样式2 - ButtonStyle_3 = 2 //开关样式3 + ButtonStyle_3 = 2, //开关样式3 + None = 3 //开关样式3 }; explicit ImageSwitch(QWidget *parent = 0); @@ -37,7 +38,7 @@ protected: private: bool isChecked; - ButtonStyle buttonStyle; + ButtonStyle buttonStyle = None; QString imgOffFile; QString imgOnFile;