ToolTip Class
Class ToolTip provides tool tips (balloon help) for any widget. More...
Header: | #include <ToolTip> |
Inherits: | QFrame |
Public Functions
ToolTip(const QString &title, const QString &text, const QIcon &icon = QIcon(), QWidget *parent = Q_NULL) | |
virtual | ~ToolTip() |
const QIcon & | icon() const |
int | margin() const |
void | setIcon(const QIcon &icon) |
void | setMargin(int margin) |
const QString & | text() const |
const QString & | title() const |
Reimplemented Public Functions
virtual QSize | sizeHint() const override |
Public Slots
Static Public Members
void | hideToolTip() |
bool | isIconVisible() |
bool | isToolTipVisible() |
void | setIconVisible(bool visible) |
void | setWrapMode(ToolTip::WrapMode mode) |
void | showToolTip(const QPoint &pos, const QString &title, const QString &text, const QIcon &icon = QIcon(), QWidget *parent = Q_NULL) |
ToolTip::WrapMode | wordWrap() |
Reimplemented Protected Functions
virtual bool | event(QEvent *event) override |
virtual bool | eventFilter(QObject *o, QEvent *event) override |
virtual void | mouseMoveEvent(QMouseEvent *event) override |
virtual void | paintEvent(QPaintEvent *event) override |
virtual void | resizeEvent(QResizeEvent *event) override |
virtual void | timerEvent(QTimerEvent *event) override |
Detailed Description
Member Function Documentation
ToolTip::ToolTip(const QString &title, const QString &text, const QIcon &icon = QIcon(), QWidget *parent = Q_NULL)
Constructs ToolTip object with the given parent. Parameter title - is a title of the tooltip, text - is a text of the tooltip.
[virtual noexcept]
ToolTip::~ToolTip()
Destructor of the ToolTip object.
[override virtual protected]
bool ToolTip::event(QEvent *event)
Reimplements: QFrame::event(QEvent *e).
[override virtual protected]
bool ToolTip::eventFilter(QObject *o, QEvent *event)
Reimplements: QObject::eventFilter(QObject *watched, QEvent *event).
[static]
void ToolTip::hideToolTip()
Hides the tooltip window.
[static]
bool ToolTip::isIconVisible()
Returns the visibility of the tooltip's icon. Method is static.
[static]
bool ToolTip::isToolTipVisible()
Returns visibility of the tooltip at the moment.
int ToolTip::margin() const
Returns the margin mode for the tolltip's text in pixels.
Note: Getter function for property margin.
See also setMargin().
[override virtual protected]
void ToolTip::mouseMoveEvent(QMouseEvent *event)
Reimplements: QWidget::mouseMoveEvent(QMouseEvent *event).
[override virtual protected]
void ToolTip::paintEvent(QPaintEvent *event)
Reimplements: QFrame::paintEvent(QPaintEvent *).
[override virtual protected]
void ToolTip::resizeEvent(QResizeEvent *event)
Reimplements: QWidget::resizeEvent(QResizeEvent *event).
[static]
void ToolTip::setIconVisible(bool visible)
Sets the visibility of the tooltip's icon to visible. Method is static.
See also isIconVisible().
void ToolTip::setMargin(int margin)
Sets the margin mode for the tolltip's text in in pixels.
Note: Setter function for property margin.
See also margin().
[static]
void ToolTip::setWrapMode(ToolTip::WrapMode mode)
Sets the wrap mode for the tolltip's text.
[static]
void ToolTip::showToolTip(const QPoint &pos, const QString &title, const QString &text, const QIcon &icon = QIcon(), QWidget *parent = Q_NULL)
Shows tooltip in pos position. Parameter title - is a title of the tooltip, text - is a text of the tooltip, icon - the icon of the tooltip. Parameter parent - reference to the widget for calculating the position of tooltip.
[override virtual]
QSize ToolTip::sizeHint() const
Reimplements: QFrame::sizeHint() const.
[override virtual protected]
void ToolTip::timerEvent(QTimerEvent *event)
Reimplements: QObject::timerEvent(QTimerEvent *event).
[static]
ToolTip::WrapMode ToolTip::wordWrap()
Returns the wrap mode for the tooltip's text.