pythonpyqtpyqt5qscintilla

how do I highlight the current line in QScintilla


I want to highlight the current line (the line the caret is in, similar to Notepad++) in QScintilla. Searching the interwebs gave nothing at all. Am I missing something obvious?

qscintillaWidget = QsciScintilla(parent = self)
qscintillaWidget.highlightCurrentLine(True)  # <- something like this

Solution

  • Enable and then choose a color.

    qscintillaWidget.setCaretLineVisible(True)
    qscintillaWidget.setCaretLineBackgroundColor(QtGui.QColor('lightblue'))