@@ -73,7 +73,7 @@ def __init__(self):
73
73
playMenu = self .menuBar ().addMenu ("&Play" )
74
74
playIcon = self .style ().standardIcon (QStyle .SP_MediaPlay )
75
75
self .playAction = toolBar .addAction (playIcon , "Play" )
76
- self .playAction .triggered .connect (self .player , SLOT ( " play()" ) )
76
+ self .playAction .triggered .connect (self .player . play )
77
77
playMenu .addAction (self .playAction )
78
78
79
79
previousIcon = self .style ().standardIcon (QStyle .SP_MediaSkipBackward )
@@ -83,17 +83,17 @@ def __init__(self):
83
83
84
84
pauseIcon = self .style ().standardIcon (QStyle .SP_MediaPause )
85
85
self .pauseAction = toolBar .addAction (pauseIcon , "Pause" )
86
- self .pauseAction .triggered .connect (self .player , SLOT ( " pause()" ) )
86
+ self .pauseAction .triggered .connect (self .player . pause )
87
87
playMenu .addAction (self .pauseAction )
88
88
89
89
nextIcon = self .style ().standardIcon (QStyle .SP_MediaSkipForward )
90
90
self .nextAction = toolBar .addAction (nextIcon , "Next" )
91
- self .nextAction .triggered .connect (self .playlist , SLOT ( " next()" ) )
91
+ self .nextAction .triggered .connect (self .playlist . next )
92
92
playMenu .addAction (self .nextAction )
93
93
94
94
stopIcon = self .style ().standardIcon (QStyle .SP_MediaStop )
95
95
self .stopAction = toolBar .addAction (stopIcon , "Stop" )
96
- self .stopAction .triggered .connect (self .player , SLOT ( " stop()" ) )
96
+ self .stopAction .triggered .connect (self .player . stop )
97
97
playMenu .addAction (self .stopAction )
98
98
99
99
self .volumeSlider = QSlider ()
@@ -105,7 +105,7 @@ def __init__(self):
105
105
self .volumeSlider .setTickInterval (10 )
106
106
self .volumeSlider .setTickPosition (QSlider .TicksBelow )
107
107
self .volumeSlider .setToolTip ("Volume" )
108
- self .volumeSlider .valueChanged .connect (self .player , SLOT ( " setVolume(int)" ) )
108
+ self .volumeSlider .valueChanged .connect (self .player . setVolume )
109
109
toolBar .addWidget (self .volumeSlider )
110
110
111
111
aboutMenu = self .menuBar ().addMenu ("&About" )
0 commit comments