2

I was wondering how I can customize qsci.setBraceMatching(QsciScintilla.SloppyBraceMatch) in pyqt5 qscintilla. I already tried changing the default lexer and customizing the stylesheet but it did not work. Thank you in advance for your help!

1 Answers1

1

You may try to use the following code:

// For unmatch braces,
qsci->setUnmatchedBraceBackgroundColor (const QColor &col);
qsci->setUnmatchedBraceForegroundColor (const QColor &col);

// For matched braces,
qsci->setMatchedBraceBackgroundColor (const QColor &col);
qsci->setMatchedBraceForegroundColor (const QColor &col);

For Python codes,

# For unmatch braces,
qsci.setUnmatchedBraceBackgroundColor(col: QColor)
qsci.setUnmatchedBraceForegroundColor(col: QColor)

# For matched braces,
qsci.setMatchedBraceBackgroundColor(col: QColor)
qsci.setMatchedBraceForegroundColor(col: QColor)

Please refer to https://brdocumentation.github.io/qscintilla/classQsciScintilla.html#abf85680f914ee631aa3a513ba823271f if you want to know more.

Misinahaiya
  • 502
  • 2
  • 17