[PyKDE] Problem with setModel on QTreeView
apaku at gmx.de
Sun Jan 22 00:53:29 GMT 2006
using setModel() on a QTreeView results in the TreeView "loosing" it's
model, if I don't save a separate reference to it. Following code
tree = QtGui.QTreeView()
The tree is empty, however first creating a variable pointing to the
model and then using setModel() with that variable works.
I wouldn't bother writing this if this would be the case for other
Views too, but at least QTableView doesn't have this limitation. I don't
need a separate reference to the model.
It also shouldn't be necessary to hold a separate reference to the
model, as QTreeView should have one internal reference to it.
You'll feel devilish tonight. Toss dynamite caps under a flamenco dancer's
More information about the PyQt