[QScintilla] Possible bug in annotations?

Phil Thompson phil at riverbankcomputing.com
Fri Apr 29 18:51:13 BST 2011


On Fri, 29 Apr 2011 02:05:16 +0100, Sarah Mount <mount.sarah at gmail.com>
wrote:
> Dear all,
> 
> I asked this on the pyqt list, but that probably isn't quite the right
> forum for this sort of question...
> 
> I'm using the PyQt4 bindings to QScintilla (PyQt4, Qt4.7.2, Python2.7,
> QtDesigner 4.7.2, Ubuntu Natty) and I have a GUI with two QScintilla
> panes, side by side. The GUI has a SLOT that adds annotations to
> certain lines, which I want to be styled.
> 
> I've created the GUI in QtDesigner, 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 is
> not. 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. So, presumably
> there's a problem in creating two QScintilla objects?
> 
> 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, including everything generated by Designer,
> as I can't really be sure what's causing the bug.
> 
> So, my question is, have I used the API incorrectly or is this a
> problem with QScintilla?
> 
> Many thanks,
> 
> Sarah

It's a bug - fixed in tonight's snapshot.

Thanks,
Phil


More information about the QScintilla mailing list