Skip to content

Commit 564f63d

Browse files
authored
example/pyqtvlc.py aesthetics (#286)
* init audio with non_zero value (pyqt5vlc.py) * add shortcuts to example/pyqt5vlc.py
1 parent e5d62f7 commit 564f63d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/pyqt5vlc.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def __init__(self, master=None):
4646

4747
# Create an empty vlc media player
4848
self.mediaplayer = self.instance.media_player_new()
49+
self.mediaplayer.audio_set_volume(50)
4950

5051
self.create_ui()
5152
self.is_paused = False
@@ -104,8 +105,13 @@ def create_ui(self):
104105

105106
# Add actions to file menu
106107
open_action = QtWidgets.QAction("Load Video", self)
107-
close_action = QtWidgets.QAction("Close App", self)
108+
open_shortcut = QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.Open)
109+
open_action.setShortcut(open_shortcut)
108110
file_menu.addAction(open_action)
111+
112+
close_action = QtWidgets.QAction("Close App", self)
113+
close_shortcut = QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.Close)
114+
close_action.setShortcut(close_shortcut)
109115
file_menu.addAction(close_action)
110116

111117
open_action.triggered.connect(self.open_file)

0 commit comments

Comments
 (0)