Пример #1
0
void QgsCodeEditorHTML::setSciLexerHTML()
{
  QsciLexerHTML* lexer = new QsciLexerHTML( this );
  lexer->setDefaultFont( QFont( "Sans", 10 ) );

  setLexer( lexer );
}
Пример #2
0
void QgsCodeEditorHTML::setSciLexerHTML()
{
  QFont font = getMonospaceFont();
#ifdef Q_OS_MAC
  // The font size gotten from getMonospaceFont() is too small on Mac
  font.setPointSize( QLabel().font().pointSize() );
#endif

  QsciLexerHTML *lexer = new QsciLexerHTML( this );
  lexer->setDefaultFont( font );
  lexer->setFont( font, -1 );
  setLexer( lexer );
}