mirror of
https://github.com/pyapp-kit/superqt.git
synced 2026-01-07 04:42:07 +01:00
* ci: [pre-commit.ci] autoupdate updates: - [github.com/charliermarsh/ruff-pre-commit: v0.0.149 → v0.0.161](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.149...v0.0.161) * fix: fix linting * style: add docstyle * style: formatting Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Talley Lambert <talley.lambert@gmail.com>
18 lines
496 B
Python
18 lines
496 B
Python
"""Example for QCollapsible."""
|
|
from qtpy.QtWidgets import QApplication, QLabel, QPushButton
|
|
|
|
from superqt import QCollapsible
|
|
|
|
app = QApplication([])
|
|
|
|
collapsible = QCollapsible("Advanced analysis")
|
|
collapsible.setCollapsedIcon("+")
|
|
collapsible.setExpandedIcon("-")
|
|
collapsible.addWidget(QLabel("This is the inside of the collapsible frame"))
|
|
for i in range(10):
|
|
collapsible.addWidget(QPushButton(f"Content button {i + 1}"))
|
|
|
|
collapsible.expand(animate=False)
|
|
collapsible.show()
|
|
app.exec_()
|