File: qcollapsible.md

package info (click to toggle)
superqt 0.7.8-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,328 kB
  • sloc: python: 9,162; makefile: 16; sh: 12
file content (24 lines) | stat: -rw-r--r-- 578 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# QCollapsible

Collapsible `QFrame` that can be expanded or collapsed by clicking on the header.

```python
from qtpy.QtWidgets import QApplication, QLabel, QPushButton

from superqt import QCollapsible

app = QApplication([])

collapsible = QCollapsible("Advanced analysis")
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_()
```

{{ show_widget(350) }}

{{ show_members('superqt.QCollapsible') }}