23 #include <Qsci/qscilexerhtml.h>
42 QsciLexerHTML *lexer =
new QsciLexerHTML(
this );
43 lexer->setDefaultFont( font );
46 lexer->setFont( font, -1 );
48 font.setItalic(
true );
49 lexer->setFont( font, QsciLexerHTML::HTMLComment );
50 lexer->setFont( font, QsciLexerHTML::JavaScriptComment );
51 lexer->setFont( font, QsciLexerHTML::JavaScriptCommentLine );
@ DoubleQuote
Double quote color.
@ CommentLine
Line comment color.
@ Default
Default text color.
@ Background
Background color.
@ SingleQuote
Single quote color.
void initializeLexer() override
Called when the dialect specific code lexer needs to be initialized (or reinitialized).
QgsCodeEditorHTML(QWidget *parent=nullptr)
Constructor for QgsCodeEditorHTML.
A text editor based on QScintilla2.
void setFoldingVisible(bool folding)
Set whether the folding controls are visible in the editor.
void runPostLexerConfigurationTasks()
Performs tasks which must be run after a lexer has been set for the widget.
void setTitle(const QString &title)
Set the widget title.
QFont lexerFont() const
Returns the font to use in the lexer.
QColor lexerColor(QgsCodeEditorColorScheme::ColorRole role) const
Returns the color to use in the lexer for the specified role.
static QColor defaultColor(QgsCodeEditorColorScheme::ColorRole role, const QString &theme=QString())
Returns the default color for the specified role.