-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
58 lines (36 loc) · 925 Bytes
/
Copy pathmain.py
File metadata and controls
58 lines (36 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import sys
from PyQt6.QtWidgets import (
QApplication,
QMainWindow,
QToolBar
)
from PyQt6.QtGui import QAction
from player import PlayerWidget
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.player = PlayerWidget()
self.setCentralWidget(self.player)
toolbar = QToolBar()
self.addToolBar(toolbar)
open_video = QAction(
"Open Video",
self
)
open_video.triggered.connect(
self.player.open_video
)
toolbar.addAction(open_video)
open_subs = QAction(
"Open Subs",
self
)
open_subs.triggered.connect(
self.player.open_subtitles
)
toolbar.addAction(open_subs)
self.resize(1400, 800)
app = QApplication(sys.argv)
window = MainWindow()
window.show()
sys.exit(app.exec())