1

I would like to add a vertical line that would mark 80 characters in QPlainTextEdit. I looked at docs but I couldn't see anything in docs. Do I need to paint it somehow myself?

gruszczy
  • 40,948
  • 31
  • 128
  • 181

1 Answers1

1

I think one possible way is to reimplement the paintEvent() and draw the line using a QPainter after calling the base class implementation. The position of the line might be computed using QFontMetrics.

Luca Carlon
  • 9,546
  • 13
  • 59
  • 91