Excellent, thanks Phil.
________________________________
From: Phil Thompson <[email protected]>
Sent: Sunday, March 24, 2019 12:37 PM
To: Matic Kukovec
Cc: QScintilla
Subject: Re: [QScintilla] QSciLexer blockStart & blockEnd return type error

On 24 Mar 2019, at 11:15 am, Matic Kukovec <[email protected]> wrote:
>
> Hi Phil,
>
> I have these two methods in a QsciLexerCustom:
>     def blockStart(self, style=0):
>         return data.QByteArray(1, "{")
>
>     def blockEnd(self, style=0):
>         return data.QByteArray(1, "}")
>
> But on pressing Enter inside the editor always throws: TypeError: invalid 
> result from MyLexer.blockStart()
> I also tried return bytes("{", encoding="utf-8") and return "{", but those 
> also throw the same error.
> This is on PyQt5.11.3 / QScintilla2.10.8.
>
> Am I missing something?

help(QsciLexer.blockStart)

Phil
_______________________________________________
QScintilla mailing list
[email protected]
https://www.riverbankcomputing.com/mailman/listinfo/qscintilla

Reply via email to