[PyKDE] textChanged()

Hans-Peter Jansen hpj at urpla.net
Wed Feb 22 15:08:18 GMT 2006


Am Mittwoch, 22. Februar 2006 15:48 schrieb Tina Isaksen:
> Me again...
>
> This time I was sure I had it right, but no... I fell into another
> trap.
>
> I have a QTextEdit widget and need to know when the contents change.
> So I found the textChanged() signal and did:
>
>     self.connect(self.mainTextWindow, SIGNAL("textChaged()"),
> self.doTest)

How about: SIGNAL("textChanged()") 
                          ^
You need to get the spelling right here, since PyQt compares those 
strings at runtime...

> Didn't work ('mainTextWindow' is my textEdit widget), so I googled
> for it and found that to catch the textChanged signal one need a
> slot.

In PyQt any method will do, like you've done..

Pete




More information about the PyQt mailing list