MCPcopy Create free account
hub / github.com/PyQt5/PyQt / highlightBlock

Method highlightBlock

Demo/TestSerializeModel.py:46–52  ·  view source on GitHub ↗
(self, text: str)

Source from the content-addressed store, hash-verified

44 ]
45
46 def highlightBlock(self, text: str) -> None:
47 for rule in self._rules:
48 index = rule.pattern.indexIn(text)
49 while index >= 0:
50 length = rule.pattern.matchedLength()
51 self.setFormat(index, length, rule.format)
52 index = rule.pattern.indexIn(text, index + length)
53
54
55class TestWindow(QWidget, Ui_SerializeWidget):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected