[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] QTreeWidget Column Resize
From:       Baz Walter <bazwal () ftml ! net>
Date:       2009-11-30 19:21:20
Message-ID: 4B141B30.2030508 () ftml ! net
[Download RAW message or body]

andre hotz wrote:
> 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.

QTreeView.columnResized isn't virtual, so your reimplemetation won't get 
called by qt.

do you actually need constant updating of the config file? if not, you 
could just save the last sizes/positions when your application closes.
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic