gruszczy
gruszczy

Reputation: 42188

Adding end line marker in QPlainTextEdit

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?

Upvotes: 1

Views: 278

Answers (1)

Luca Carlon
Luca Carlon

Reputation: 9986

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.

Upvotes: 1

Related Questions