Toolbox Qt
|
Custom QToolButton implementing wordwrap. More...
Public Member Functions | |
BtnTool (QWidget *parent=nullptr) | |
BtnTool (const QString &text, int padding=5, QWidget *parent=nullptr) | |
void | setText (const QString &text) |
Use to set text of button. | |
![]() | |
void | setPadding (int padding) |
Set padding to use inside button. | |
const QString & | getText () const |
Get button text. | |
int | getPadding () const |
Get current padding to use. | |
Protected Member Functions | |
void | paintEvent (QPaintEvent *event) override |
QSize | sizeHint () const override |
QSize | minimumSizeHint () const override |
void | updateGeometryBtn () override |
void | updateBtn () override |
![]() | |
void | setTextWordWrap (const QString &text) |
Use to set button text. | |
void | paintTextWordWrap (QPainter *painter, const QRect &rect) |
QSize | calcSizeHintWordWrap (const QFontMetrics &fm, int width) const |
virtual void | updateGeometryBtn ()=0 |
virtual void | updateBtn ()=0 |
Custom QToolButton implementing wordwrap.
Include with:
void tbq::BtnTool::setText | ( | const QString & | text | ) |
Use to set text of button.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This method is an overload, which simply call setTextWordWrap
method.
[in] | text | Text to display inside the button. |
|
overrideprotectedvirtual |
Implements tbq::BtnAbstractWordWrap.
|
overrideprotectedvirtual |
Implements tbq::BtnAbstractWordWrap.