I\'m trying to create a TextEdit widget that will have a delimiter line. As a start, I\'ve created a MyTextEdit class (as a subclass of a QTextEdit
MyTextEdit
QTextEdit
If a widget has a viewport, you have to pass that to the QPainter constructor:
QPainter
painter = QPainter(self.viewport())