Hello,

How does one allow the fields of a tree to be editable?

I've read that items of a tree widget are not editable by default. By setting setEditTriggers(), one can control editability. That gets set on the view, right? I've got a pure model that the view gets set to. Is there something I need to do there as well?

Here's a portion of my view code:

                self.theView = QtGui.QTreeView()
                self.theView.setEditTriggers(QtGui.QTreeView.DoubleClicked)
                self.theView.setSelectionBehavior(QtGui.QTreeView.SelectItems)
                self.theView.setUniformRowHeights(True)
                self.theView.setAlternatingRowColors(True)

Double-clicking on a field just opens/closes that tree branch's nesting. Setting the edit triggers to AllEditTriggers yields the same results: no editability.

Thanks in advance!
Scott








_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to