Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yjg30737/pyqt-file-list-widget

PyQt QListWidget for files (Being able to drop the files based on user-defined extensions)
https://github.com/yjg30737/pyqt-file-list-widget

py37 pyqt pyqt-examples pyqt-file-list-widget pyqt-qlistwidget pyqt-tutorial pyqt5 pyqt5-examples pyqt5-file-list-widget pyqt5-gui pyqt5-qlistwidget pyqt5-tutorial python python3 python37 qlistwidget qt

Last synced: about 1 month ago
JSON representation

PyQt QListWidget for files (Being able to drop the files based on user-defined extensions)

Awesome Lists containing this project

README

        

# pyqt-file-list-widget
PyQt QListWidget for files (Being able to drop the files based on user-defined extensions)

## Requirements
PyQt5 >= 5.8

## Setup
`python -m pip install pyqt-file-list-widget`

## Included Packages
* pyqt-tooltip-list-widget - parent class
* pyqt-files-already-exists-dialog

## Method Overview
* `addFilenames(filenames: list, cur_filename: str = '')` - Add files on the list. `cur_filename` is current file name to set. Default is first one.
* `setFilenames(filenames: list, cur_filename: str = '')` - Clear the list before adding new files on the list.
* `addDirectory(dirname: str, cur_filename: str = '')` - Add files in directory.
* `setDirectory(dirname: str, cur_filename: str = '')` - Clear the list before adding new files on the list.
* `setFilenameOnly(f: bool)` - Show file name only. ex) C:\...\abc.txt -> abc.txt
* `isFilenameOnly() -> bool`
* `getSelectedFilenames() -> list`
* `removeSelectedRows()`
* `clear()` - Overriding method.
* `getAbsFilename(basename: str) -> str` - Get the absolute file path with base file name.
* `setExtensions(extensions: list)` - Set the acceptable extensions of list.
* `setDuplicateEnabled(f: bool)` - Allow list to have duplicate item.
* `isDuplicateEnabled() -> bool`
* `getFilenameFromRow(r: int) -> str`

## Example
See pyqt-top-left-right-file-list-widget