On Wed, 14 Jul 2010 14:27:38 -0300, Samuel Nascimento Pagliarini
<[email protected]> wrote:
> Hey,
> 
> I am trying to make a verilog editor but I cant quite get it to work
> the way I want. I am able to change the colors of most tokens by using
> these lines:
> 
> ...
>  lex->setColor(QColor("red"), QsciLexerVerilog::Default);
>  lex->setColor(QColor("blue"), QsciLexerVerilog::Comment);
>  lex->setColor(QColor("blue"), QsciLexerVerilog::CommentBang);
>  lex->setColor(QColor("blue"), QsciLexerVerilog::CommentLine);
>  lex->setColor(QColor("magenta"), QsciLexerVerilog::Number);
> ...
> 
> The problem is that some main keywords never get a color. I even tried
> the following:
> 
> lex->setColor(QColor("darkRed"), -1);
> 
> still, keywords like "module", "begin", "end" are not colored. Any
ideas?

All keywords or just some of them?

I assume you tried...

lex->setColor(QColor("darkRed"), QsciLexerVerilog::Keyword);

The other approach would be to sub-class QsciLexerVerilog and reimplement
defaultColor().

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

Reply via email to