[PyQt] QTreeWidget Column Resize

andre hotz andre.hotz at piranha-bytes.com
Mon Nov 30 10:46:24 GMT 2009


Hi,

I have a little question regarding the QTreeWidget. I have a couple 
columns inside the treewidget which are resizeable and moveable.
Now I want to get notified when the user changes the size or position of 
a column so I can store the new size/position and save it in a config file.
Unfortunatly, there does not seem to be an event or something which 
informs me about the changes.
I tried it by declaring a "columnResized" method

class myTreeWidget_DEF(QtGui.QTreeWidget):
    def __init__(self, parent=None):
        QtGui.QTreeWidget.__init__(self, parent)
       
    def columnResized(self, a,b,c):
        print "test"

but nothing happens.

Does anyone has an idea?

Thank you very much!

Andre



More information about the PyQt mailing list