Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yjg30737/pyqt-checkbox-list-widget
PyQt QListWidget for checkable items
https://github.com/yjg30737/pyqt-checkbox-list-widget
py37 pyqt pyqt-examples pyqt-qlistwidget pyqt-tutorial pyqt5 pyqt5-examples pyqt5-qlistwidget pyqt5-tutorial python python3 python37 qcheckbox qlistwidget qt
Last synced: 16 days ago
JSON representation
PyQt QListWidget for checkable items
- Host: GitHub
- URL: https://github.com/yjg30737/pyqt-checkbox-list-widget
- Owner: yjg30737
- License: mit
- Created: 2021-12-11T22:47:13.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-06T01:38:30.000Z (6 months ago)
- Last Synced: 2024-11-02T08:30:35.610Z (about 2 months ago)
- Topics: py37, pyqt, pyqt-examples, pyqt-qlistwidget, pyqt-tutorial, pyqt5, pyqt5-examples, pyqt5-qlistwidget, pyqt5-tutorial, python, python3, python37, qcheckbox, qlistwidget, qt
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyqt-checkbox-list-widget
PyQt QListWidget for checkable items## Requirements
PyQt5 >= 5.8## Setup
`python -m pip install pyqt-checkbox-list-widget`## Included Packages
* pyqt-tooltip-list-widget - parent class### Note
If you want to use pyqt-checkbox-list-widget only without pyqt-tooltip-list-widget, just remove and update the source - bug won't occur.## Example
```python
from PyQt5.QtWidgets import QCheckBox, QVBoxLayout, QWidget, QApplication
from pyqt_checkbox_list_widget.checkBoxListWidget import CheckBoxListWidgetclass Widget(QWidget):
def __init__(self):
super().__init__()
self.__initUi()def __initUi(self):
allCheckBox = QCheckBox('Check all')
checkBoxListWidget = CheckBoxListWidget()
checkBoxListWidget.addItems(['a', 'b', 'c', 'd'])allCheckBox.stateChanged.connect(checkBoxListWidget.toggleState)
lay = QVBoxLayout()
lay.addWidget(allCheckBox)
lay.addWidget(checkBoxListWidget)self.setLayout(lay)
if __name__ == "__main__":
import sysapp = QApplication(sys.argv)
widget = Widget()
widget.show()
app.exec_()
```Result
https://user-images.githubusercontent.com/55078043/145694178-9d583318-2533-43fd-bbc1-71c85444a953.mp4
## Similar package
pyqt-checkbox-table-widget