[PyQt] QScintilla SCN_MODIFIED problems

Phil Thompson phil at riverbankcomputing.com
Tue Dec 20 22:29:41 GMT 2011


On Tue, 20 Dec 2011 15:17:50 -0600, "Bryan A. Jones"
<bjones at ece.msstate.edu> wrote:
> All,
> 
> I'm using Python 2.7.2 with PyQt-4.8.5 on Windows 7 SP 1. Can anyone
help
> me connect to the SCN_MODIFIED signal? From the archives at
> http://www.riverbankcomputing.com/pipermail/pyqt/2010-May/026726.html,
> others have used it. However, this code:
> 
> self.plainTextEdit.SCN_MODIFIED.connect(self.on_plainTextEdit_modified)
> 
> (where self.plainTextEdit is a QScintilla instance) produces the
messages:
> 
> Object::connect: No such signal QsciScintilla::SCN_MODIFIED(
> int,int,char*,int,int,int,int,int,int,int)
> Object::connect:  (sender name:   'plainTextEdit')
> Traceback (most recent call last):
>   File "C:\robotics_research\documentation\html_edit.py", line 452, in
> <module>
>     form = MyWidget('./practicum2Summer2011.c')
>   File "C:\robotics_research\documentation\html_edit.py", line 77, in
> __init__
>    
self.plainTextEdit.SCN_MODIFIED.connect(self.on_plainTextEdit_modified)
> TypeError: connect() failed between
> SCN_MODIFIED(int,int,char*,int,int,int,int,int,int,int)
> and unislot()
> 
> However, a call to:
> 
> self.plainTextEdit.SCEN_CHANGE.connect(self.on_plainTextEdit_modified)
> 
> works as expected, so I'm not sure what's wrong. Any help would be
> appreciated!
> 
> Bryan

It's a SIP bug, fixed in tonight's snapshot. The workaround is to use the
old-style connection syntax (noting that the "char *" argument should be
"const char *").

Thanks,
Phil


More information about the PyQt mailing list