We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16ba1c2 commit 475a8bdCopy full SHA for 475a8bd
qfluentwidgets/components/widgets/button.py
@@ -54,7 +54,11 @@ def _postInit(self):
54
pass
55
56
def setIcon(self, icon: Union[QIcon, str, FluentIconBase]):
57
- self.setProperty('hasIcon', icon is not None)
+ if icon is None or (isinstance(icon, QIcon) and icon.isNull()):
58
+ self.setProperty('hasIcon', False)
59
+ else:
60
+ self.setProperty('hasIcon', True)
61
+
62
self.setStyle(QApplication.style())
63
self._icon = icon or QIcon()
64
self.update()
0 commit comments