Simple PyQt widget which contains QListWidget and add, delete QPushButton to add and delete file in the list
MIT License
Simple PyQt widget which contains QListWidget and add, delete QPushButton to add and delete file in the list
PyQt5 >= 5.8
python -m pip install pyqt-top-left-right-file-list-widget
setLabel(text: str)
- Set the label at the left side.setExtensions(ext_lst: list)
- Define the specific extensions to add.setDuplicateEnabled(f: bool)
- Allow to add duplicate name to list.isDuplicateEnabled() -> bool
Code Example
from PyQt5.QtWidgets import QApplication
from pyqt_top_left_right_file_list_widget.topLeftRightFileListWidget import TopLeftRightFileListWidget
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
topLeftRightFileListWidget = TopLeftRightFileListWidget()
topLeftRightFileListWidget.show()
app.exec_()
Result
Show file name only
You can select multiple files on the list. If at least one file is selected, delete button(red dash icon) will be clickable.
Click it and selected ones will be removed from the list.
If some of files you want to add already exist in the list, Notice dialog will pop up to show you which files exist in the list. If you click OK, it will add files which are not duplicated. Otherwise none of files you want to add will be on the list.
I'm currently working with "Don't ask again" feature. Hope you don't mind.