And what is wrong with QPlainTextEdit?
I don't see how QScrollArea is preventing you from doing that.I need to use a QAbstractScrollArea instead of a QScrollArea because I want it to scroll lines instead of pixels when receiving a wheel event.
That's not how it's done. Use QAbstractScrollArea::setViewportMargins() and place your line counting widget in the blank space left by the viewport.Moreover, I'd like to have in the viewport another widget which shows line numbers and, when receiving horizontal scroll events, scroll only the widget with the text but not the widget with the line numbers.






Reply With Quote
Bookmarks