diff --git a/win_venv/files/input/input2.mp4 b/win_venv/files/input/input1 — kopia.mp4 similarity index 100% rename from win_venv/files/input/input2.mp4 rename to win_venv/files/input/input1 — kopia.mp4 diff --git a/win_venv/main.py b/win_venv/main.py index 12d6135..869f44f 100644 --- a/win_venv/main.py +++ b/win_venv/main.py @@ -22,6 +22,9 @@ class LibraryTableButtons(QWidget): def viewFile(): os.startfile(filePath + '\\' + filename) + def deleteFile(): + os.remove(filePath + '\\' + filename) + layout = QHBoxLayout() layout.setContentsMargins(0,0,0,0) layout.setSpacing(0) @@ -29,7 +32,10 @@ class LibraryTableButtons(QWidget): view_btn = QPushButton('View') view_btn.clicked.connect(viewFile) layout.addWidget(view_btn) - layout.addWidget(QPushButton('Delete')) + + delete_btn = QPushButton('Delete') + delete_btn.clicked.connect(deleteFile) + layout.addWidget(delete_btn) self.setLayout(layout)