(self)
| 31 | "old bg color", old, "new bg color", new)) |
| 32 | |
| 33 | def onClick(self): |
| 34 | print("textColor", self._textColor) |
| 35 | self.setStyleSheet("qproperty-backgroundColor: %s;" % randint(1, 1000)) |
| 36 | |
| 37 | # 方式一、个人觉得比较简洁 |
| 38 | @pyqtProperty(str, notify=bgChanged) |