https://github.com/yjg30737/pyqt-list-viewer-widget
PyQt widget which consist two widgets: file list widget and viewer widget
https://github.com/yjg30737/pyqt-list-viewer-widget
pyqt pyqt-examples pyqt5 pyqt5-desktop-application pyqt5-examples pyqt5-gui pyqtsignal python python3 python37 qlistwidget qt qt-examples qt5 qt5-gui
Last synced: 5 months ago
JSON representation
PyQt widget which consist two widgets: file list widget and viewer widget
- Host: GitHub
- URL: https://github.com/yjg30737/pyqt-list-viewer-widget
- Owner: yjg30737
- License: mit
- Created: 2022-04-07T09:10:17.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-24T01:04:12.000Z (almost 3 years ago)
- Last Synced: 2024-12-29T08:42:11.761Z (5 months ago)
- Topics: pyqt, pyqt-examples, pyqt5, pyqt5-desktop-application, pyqt5-examples, pyqt5-gui, pyqtsignal, python, python3, python37, qlistwidget, qt, qt-examples, qt5, qt5-gui
- Language: Python
- Homepage:
- Size: 38.1 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyqt-list-viewer-widget
PyQt widget which consist two widgets: file list widget and viewer widget## Requirements
* PyQt5 >= 5.8## Setup
`pip3 install git+https://github.com/yjg30737/pyqt-file-list-widget.git --upgrade`## Method Overview
* `setView(view)` - Set the view.
* `setExtensions(extensions: list)` - Set the extensions you want to accept. ex) ['.txt', '.doc']
* `addDirectory(dirname: str, cur_filename: str = '')` - Add the files in `dirname` directory. Set `cur_filename` argument if you want to make list set current filename.
* `setDirectory(dirname: str, cur_filename: str = '')` - Clear the list and add the directory.
* `addFilenames(filenames: list, cur_filename: str = '')`
* `setFilenames(filenames: list, cur_filename: str = '')`
* `getFileWidget()` - Return `FileWidget` on the left side of whole widget.
* `getListWidget()` - Return `FileListWidget`, list widget containing files placed in the `FileWidget`)
* `getViewerWidget()` - Return `ViewerWidget` on the right side of whole widget.
* `setAddAsDirectory(f: bool)` - If this is set `True`, adding a file in certain directory is not only add the file itself, but also add the other files.
* `isAddAsDirectory() -> bool`
* `setWindowTitleBasedOnCurrentFileEnabled(f: bool, prefix: str = '')` - If this is set `True` and prefix is being set, window title's format is set like `Prefix - 1.png` -> `Prefix - 2.png` ...
* `setBottomWidgetVisible(f: bool)` - Toggle the visibility of bottom widget (navigation widget) of viewer widget.
* `getCurrentFilename() -> str`## Included Packages
* simplePyQt5
* pyqt-svg-icon-pushbutton
* pyqt-checkbox-file-list-widget
* pyqt-viewer-widget## App Included This Package
* pyqt-html-viewer
* pyqt-svg-viewer