def playpause(self, btn):
if self.playing:
os.system("""osascript -e 'tell application "iTunes" to pause'""")
self.playing = False
btn.setIcon(QIcon(QPixmap("play.png").scaled(40, 40, Qt.KeepAspectRatio, Qt.SmoothTransformation)))
else:
os.system("""osascript -e 'tell application "iTunes" to play'""")
self.playing = True
btn.setIcon(QIcon(QPixmap("pause.png").scaled(40, 40, Qt.KeepAspectRatio, Qt.SmoothTransformation)))
评论列表
文章目录