QWidget that displays line number for a QTextEdit. More...
#include <pqPythonLineNumberArea.h>
Inherits QWidget.
Public Member Functions | |
pqPythonLineNumberArea (QWidget *parent, const QTextEdit &text) | |
QSize | sizeHint () const override |
Return the size hint based on the number of lines present in the text. More... | |
Protected Member Functions | |
void | paintEvent (QPaintEvent *event) override |
Paint the widget. More... | |
QWidget that displays line number for a QTextEdit.
This widget is to be associated with a QTextEdit widget (stored as text) this class. It displays the number of lines inside the text and highlight the line where the cursor is.
This must be used inside a QHLayout and placed either left or right of the refered text. The paintEvent is in charge of painting this widget.
Definition at line 26 of file pqPythonLineNumberArea.h.
|
inlineexplicit |
Definition at line 35 of file pqPythonLineNumberArea.h.
|
override |
Return the size hint based on the number of lines present in the text.
|
overrideprotected |
Paint the widget.
This method paints the widget area by going through the visible block inside text. Are displayed the line number from the text in one color and the line containing the cursor in another color.
event | the pain event |