PyQt QListWidget which itemWidget is foldable
Project description
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
Example
Code Sample
from PyQt5.QtWidgets import QPushButton, QVBoxLayout, QLineEdit, QTextEdit, QWidget, QApplication
from pyqt_foldable_item_list_widget import FoldableListWidget
class 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 sys
app = QApplication(sys.argv)
widget = Widget()
widget.show()
app.exec_()
Result
See Also
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pyqt-foldable-item-list-widget-0.0.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 440fcf202faaa14c47e8f7c2579ed54f3814897953733df759ce4145a37f6130 |
|
MD5 | 29f8f29031ab7d60a7616ac9ec836e80 |
|
BLAKE2b-256 | ee4278643ca3d0c833873e94a8e9281d6d6362b2578d5dead62be20154325a87 |
Close
Hashes for pyqt_foldable_item_list_widget-0.0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30aff1f5feb99df7452508aff98d31c152fbc1917dfc5108da64ff96a9a1af4f |
|
MD5 | 064edf13f940e214c646ed8683141b02 |
|
BLAKE2b-256 | a0f5823c9b6ba7b64a13a6bd16027dc938ef5b69ff16eb4f5dba27bb11a75f4e |