MCPcopy Create free account
hub / github.com/PyQt5/PyQt / chooseBackgroundColor

Method chooseBackgroundColor

QProgressBar/WaterProgressBar.py:70–78  ·  view source on GitHub ↗

设置背景颜色

(self)

Source from the content-addressed store, hash-verified

68 self._valueTimer.start(100)
69
70 def chooseBackgroundColor(self):
71 """设置背景颜色"""
72 col = QColorDialog.getColor(self.bar.backgroundColor, self)
73 if not col.isValid():
74 return
75 self.bar.backgroundColor = col
76 pix = QPixmap(16, 16)
77 pix.fill(col)
78 self.sender().setIcon(QIcon(pix))
79
80 def chooseTextColor(self):
81 """设置文字颜色"""

Callers

nothing calls this directly

Calls 1

setIconMethod · 0.80

Tested by

no test coverage detected