[QScintilla] Editor with a custom lexer keeps flashing when editing

Phil Thompson phil at riverbankcomputing.com
Tue May 31 10:39:52 BST 2016


On 31 May 2016, at 1:02 am, agarny at hellix.com wrote:
> 
> Hi Neil,

Wrong mailing list.

> I am currently working on upgrading to Qt 5.5.1 from 5.4.2 in my project. It's all working fine for different QScintilla-based editors that I have in my application, except for one. The only difference between that editor and the others is that it relies on a custom lexer. As you might expect, that lexer is implemented in a class that inherits from QsciLexerCustom (see https://goo.gl/cjrYCM and https://goo.gl/cMojqk).
> 
> Now, my problem, when my project is built using Qt 5.5.1 on OS X (everything works fine on Windows and Linux), is that if I then try to edit something in that particular editor, then I get one or two black lines flashing repeatedly for as long as I keep editing.
> 
> After some debugging, I found out that the 'culprit' is Editor::Paint(), more precisely the paintState == paintAbandoned if clause. That if clause is true then it will return after it has done what it needs to do. Now, if I comment out the return statement (see https://goo.gl/5jDdXt), everything works fine for me (i.e. I don't get the one or two black lines flashing repeatedly).
> 
> So, although I have got things to work fine for my application, I wanted to check with you that what I have done is actually 'safe'. If it is, then maybe this is something that could be merged in?

That relates to the underlying Scintilla code, not the QScintilla code.

Is the Qt update the only change? Can be behaviour be reproduced in a simple, self-contained example?

Phil


More information about the QScintilla mailing list