[PyQt] Probleme with the metho description of QSciScintlla
phil at riverbankcomputing.com
Mon Jun 15 22:36:02 BST 2009
On Mon, 15 Jun 2009 22:33:50 +0200, projetmbc <projetmbc at club-internet.fr>
>> I've tired to implement that :
>> def description(self, style):
>> print '(style)'
>> print (style)
>> return ''
>> Then numbers from 0 to 30 has been catched by the method. What is the
>> meaning of this numbers ? Sorry for beeing such a newbie.
> 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.
More information about the PyQt