Merge pull request 'deleting the file' (#4) from VIS-24 into master
Reviewed-on: #4
This commit is contained in:
commit
e25ea9936d
@ -34,6 +34,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)
|
||||
@ -41,7 +44,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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user