MCPcopy Index your code
hub / github.com/PyQt5/PyQt / set_control

Method set_control

QtWinExtras/ThumbnailToolBar.py:71–79  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

69 self.labelNext.setText('点击下一首按钮: %d 次' % self.countNext)
70
71 def set_control(self):
72 if self.toolBtnControl.property('status') == 0:
73 self.labelControl.setText('正在播放')
74 self.toolBtnControl.setProperty('status', 1)
75 self.toolBtnControl.setIcon(self.style().standardIcon(QStyle.SP_MediaPause))
76 else:
77 self.labelControl.setText('暂停播放')
78 self.toolBtnControl.setProperty('status', 0)
79 self.toolBtnControl.setIcon(self.style().standardIcon(QStyle.SP_MediaPlay))
80
81 def showEvent(self, event):
82 super(Window, self).showEvent(event)

Callers

nothing calls this directly

Calls 2

setIconMethod · 0.80
setTextMethod · 0.45

Tested by

no test coverage detected