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

List:       pykde
Subject:    Re: [PyQt] Table changed/modified method
From:       Baz Walter <bazwal () ftml ! net>
Date:       2009-10-26 19:37:15
Message-ID: 4AE5FA6B.4060609 () ftml ! net
[Download RAW message or body]

Filippo Rebora wrote:
> self.tableWidget.cellChanged(int, int).connect(self.tableWasModified)
> 
> Still doesn't work

self.tableWidget.cellChanged is a pyqtBoundSignal object.

signals can have several different signatures. so pyqtBoundSignal 
objects define __getitem__ to allow the different signatures to be 
accessed by key like a dict.

in this case, the key is the tuple: (int, int). so your code should be:

self.tableWidget.cellChanged[(int, int)].connect(self.tableWasModified)

or, more cleanly:

self.tableWidget.cellChanged[int, int].connect(self.tableWasModified)

also note that if the signature is omitted, a default signature will be 
used instead. so in this case you could get the same result by using:

self.tableWidget.cellChanged.connect(self.tableWasModified)

(which i believe was suggested earlier in this thread).

HTH
_______________________________________________
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