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!
Asked
Active
Viewed 71 times
2

Benjamin Sloutsky
- 163
- 1
- 11
-
Customise in what way? What "did not work"? – ekhumoro Dec 21 '21 at 17:06
-
@ekhumoro Change the foreground and background when I select matching braces in qsci – Benjamin Sloutsky Dec 21 '21 at 23:34
1 Answers
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