[PyQt] QTextDocument and contentChange(int, int, int)

Phil Thompson phil at riverbankcomputing.com
Mon Feb 25 17:25:14 GMT 2008


On Monday 25 February 2008, Tim Kornhammar wrote:
> Hi.
>
> >From what I understand the function contentChange(int, int, int) is
>
> implemented but at the same time it does not seem like python accepts the
> following code:
>
>  self.connect(self.tabs.docs.getTextEdit(index).document(),
> QtCore.SIGNAL('contentsChange(int,
> int, int)'), self.MainWindow, QtCore.SLOT("self.test"))
>
> or
>
>  self.connect(self.tabs.docs.getTextEdit(index).document(),
> QtCore.SIGNAL('contentsChange()'),
> self.MainWindow, QtCore.SLOT("self.test"))
>
> I've tried a lot of different options but in the end only contentsChanged()
> works and how am I supposed to make syntax-coding work efficient without
> knowing the lines that where changed? To recheck the hole document seems
> like a stretch.

Don't use SLOT() for Python slots - just pass the callable.

Phil


More information about the PyQt mailing list