Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yjg30737/pyqt-foldable-item-list-widget
PyQt QListWidget which itemWidget is foldable
https://github.com/yjg30737/pyqt-foldable-item-list-widget
pyqt pyqt-examples pyqt5 pyqt5-examples pyqt5-tutorial python python3 python37 qlistwidget qlistwidgetitem qt
Last synced: about 1 month ago
JSON representation
PyQt QListWidget which itemWidget is foldable
- Host: GitHub
- URL: https://github.com/yjg30737/pyqt-foldable-item-list-widget
- Owner: yjg30737
- License: mit
- Created: 2022-02-14T01:56:32.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-18T04:42:32.000Z (over 2 years ago)
- Last Synced: 2024-12-28T20:46:18.466Z (about 2 months ago)
- Topics: pyqt, pyqt-examples, pyqt5, pyqt5-examples, pyqt5-tutorial, python, python3, python37, qlistwidget, qlistwidgetitem, qt
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyqt-foldable-item-list-widget
PyQt QListWidget which itemWidget is foldable## Requirements
* PyQt5 >= 5.8## Setup
`python -m pip install pyqt-foldable-item-list-widget`## Included Package
* pyqt-svg-button## Example
Code Sample
```python
from PyQt5.QtWidgets import QPushButton, QVBoxLayout, QLineEdit, QTextEdit, QWidget, QApplication
from pyqt_foldable_item_list_widget import FoldableListWidgetclass Widget(QWidget):
def __init__(self):
super().__init__()
self.__initUi()def __initUi(self):
addBtn = QPushButton('Add')
addBtn.clicked.connect(self.__add)
self.__foldableListWidget = FoldableListWidget()
lay = QVBoxLayout()
lay.addWidget(addBtn)
lay.addWidget(self.__foldableListWidget)
self.setLayout(lay)def __add(self):
foldedItem = QLineEdit()
foldedItem.setPlaceholderText('Input...')
unfoldedItem = QTextEdit()
unfoldedItem.setPlaceholderText('Input...')
self.__foldableListWidget.setFoldableListWidgetItem(foldedItem, unfoldedItem)if __name__ == "__main__":
import sysapp = QApplication(sys.argv)
widget = Widget()
widget.show()
app.exec_()
```Result
![python 2022-02-14 오전 11_16_52](https://user-images.githubusercontent.com/55078043/153788861-fea13fd4-475f-4112-bd0c-411a0936b479.png)
## See Also
* pyqt-foldable-window