I would like to create a specific QPlainTextEditor in Qt. Namely, I would like to highlight every second row with grey. Now, I’ve made a new QAbstractScrollArea class (HighlightedOddLineScrollArea) and I’ve modified its paintEvent, but I’ve no idea how to implement it into my text editor. Do I have to do it through a constructor, or is there a function to exchange the default one?
I would like to create a specific QPlainTextEditor in Qt. Namely, I would like
Share
You will need to subclass QPlainTextEditor and reimplement its paintEvent function. Since the function is virtual the one that you define will be called instead of the parent class’