A tree widget representing QObject hierarchy (for development purposes).
The most common use case of this widget is to debug applications which may have “zombie” widgets lying around when some widget is removed, reparented in a dynammic GUI.
Example:
from qarbon.external.qt import QtCore, QtGui
from qarbon.qt.gui.application import Application
from qarbon.qt.gui.treeqobject import TreeQObjectWidget
app = Application()
# mw will be the QObject to be "seen" in the Tree (along with all its
# childs, of course)
mw = QtGui.QMainWindow()
mw.setObjectName("main window")
w = QtGui.QWidget()
w.setObjectName("central widget")
mw.setCentralWidget(w)
l = QtGui.QVBoxLayout()
w.setLayout(l)
l1 = QtGui.QLabel("H1")
l1.setObjectName("label 1")
l.addWidget(l1)
l2 = QtGui.QLabel("H2")
l2.setObjectName("label 2")
l.addWidget(l2)
mw.show()
inspector = TreeQObjectWidget(qobject=w)
inspector.setAttribute(QtCore.Qt.WA_QuitOnClose, False)
inspector.show()
app.exec_()
Functions
| getQObjectIcon | |
| getQObjectTree | |
| getQObjectTreeStr | |
| getQObjectTreeAsDict | |
| getQObjectTreeAsList |
Classes
| TreeQObjectWidget | A tree representation of the selected QObject childs. |
Bases: qarbon.external.enum._enum.Enum
possible displays of a QObject
Bases: qarbon.qt.gui.basemodel.BaseModel
Bases: qarbon.qt.gui.basetree.BaseTreeWidget
A tree representation of the selected QObject childs.
The use case of this widget is to debug applications which may have “zombie” widgets lying around when some widget is removed, reparented in a dynammic GUI.