[PyQt] Possible bug in QScinitlla annotations

Sarah Mount mount.sarah at gmail.com
Wed Apr 27 14:58:08 BST 2011


Hi everyone,

I have a GUI (PyQt4, Qt4.7.2, Python2.7, QtDesigner 4.7.2, Ubuntu
Natty) with two QScintilla panes. I have a SLOT that adds annotations
to certain lines, which I want to be styled. I've created the GUI in
Designer, and my own code styles both editor panes in the same way, so
I would expect there would be no difference between the two. When I
add an annotation to each editor for testing, one is styled in the
annotation style I have set and the other isn't. Oddly, it's always
the right hand pane which is wrong, if I swap them over like this:

    self.leftEditor, self.rightEditor = self.rightEditor, self.leftEditor

then it's still the right hand pane which is incorrect.

I made a cut down version of the GUI just to show you what the bug
looks like: http://imgur.com/dcRbi In the image, both annotations
should look like the left hand one, with a yellow background and
smaller, italicized text. The code which generates this I've put here:
https://gist.github.com/944268 there's still quite a bit of
"irrelevant" code there, as I can't really be sure what's causing the
bug.

Is it me or is this a problem with QScintilla?

Thanks (yet again),

Sarah

-- 
Sarah Mount, Senior Lecturer, University of Wolverhampton
website:  http://www.snim2.org/
twitter: @snim2


More information about the PyQt mailing list