[PyQt] Probleme with the metho description of QSciScintlla

projetmbc projetmbc at club-internet.fr
Mon Jun 15 23:20:14 BST 2009

Phil Thompson a écrit :
>> Indeed, I've understood that this number are the default lexers. The 
>> following seems to work :
>> ===================
>>     def description    (self, style):
>>         if style == 7:
>>             return 'myLexer'
>>         return ''
>> ===================
>> Is-it what I'm supposed to do or not ? The problem is that I've no 
>> concrete example so as to start. Is there for example the C++ code of 
>> one of the default lexer ? Then the migration to Python must be easier. 
>> I hope.
> No, the numbers are the style numbers. It is up to you to decide what each
> style means and how it will be rendered, ie. the font, foreground and
> background colours etc.
> If you can read C++ there are nearly 30 examples in the QScintilla source.
> Phil
Ok the things become a little bit clrear. I'll try to play with that 
this week. My  be the simpler would be to transpose an existing lexer 
like XML to the Python syntax.

Is the definition of a style is made by calling setStyling ?

Thanks for your patrience.

More information about the PyQt mailing list