I am writing a Visual Basic IDE, and I need to add lines numbers to QTextEdit and highlight current line. I have found this tutorial, but it is written in Java and I write my project in C++.
Here's the equivalent tutorial in C++:
Qt4: http://doc.qt.io/qt-4.8/qt-widgets-codeeditor-example.html
Qt5: http://doc.qt.io/qt-5/qtwidgets-widgets-codeeditor-example.html