Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Code Editor Example - Horizontal Scrolling
mjurjevic last edited by
I have been working on application that will use similar widget to one described in Qt's Code Editor example. I've started from there and upgraded LineNumberArea + added similar area between LineNumberArea and QPlainTextEdit widget for showing memory addresses (AddressArea).
On the image above, scroll slider is on minimum. Moving slider only scrolls QPlainTextEdit widget.
My problem is that LineNumberArea and AddressArea are fixed. They are not affected by horizontal scrolling. Vertical scrolling is working fine as that is done in updateLineNumberArea -> which receives only dy scroll value.
Finally my question is, how can I achieve that when moving horizontal slider, LineNumberArea and AddressArea are shifted to the left that is scroll as they were part of QPlainTextEdit widget's scroll functionality?