mirror of
https://github.com/pyapp-kit/superqt.git
synced 2026-01-05 11:50:51 +01:00
840 B
840 B
QSearchableTreeWidget
QSearchableTreeWidget combines a
QTreeWidget and a QLineEdit for showing a mapping that can be searched by key.
This is intended to be used with a read-only mapping and be conveniently created
using QSearchableTreeWidget.fromData(data). If the mapping changes, the
easiest way to update this is by calling setData.
from qtpy.QtWidgets import QApplication
from superqt import QSearchableTreeWidget
app = QApplication([])
data = {
"none": None,
"str": "test",
"int": 42,
"list": [2, 3, 5],
"dict": {
"float": 0.5,
"tuple": (22, 99),
"bool": False,
},
}
tree = QSearchableTreeWidget.fromData(data)
tree.show()
app.exec_()
{{ show_widget() }}
{{ show_members('superqt.QSearchableTreeWidget') }}