![]() |
LeechCraft 0.6.70-17609-g3dde4097dd
Modular cross-platform feature rich live environment.
|
ToolTip for Qml objects. More...
#include "tooltipitem.h"
Public Slots | |
void | showToolTip () |
Shows the tooltip immediately. |
Signals | |
void | textChanged () |
Emitted when the text of this tooltip changes. | |
void | containsMouseChanged () |
Emitted when the containsMouse property changes. |
Public Member Functions | |
ToolTipItem (QQuickItem *parent=nullptr) | |
Constructs the tooltip with the given parent item. | |
void | SetText (const QString &text) |
Sets the text contained in this tooltip to text. | |
QString | GetText () const |
Returns the text of this tooltip. | |
bool | ContainsMouse () const |
Returns whether the tooltip contains the mouse. | |
void | ShowToolTip (const QString &text) const |
Shows tooltip with the given text immediately. |
Protected Member Functions | |
void | hoverEnterEvent (QHoverEvent *) override |
void | hoverLeaveEvent (QHoverEvent *) override |
Properties | |
QString | text |
The text of this tooltip item (rich text supported). | |
bool | containsMouse |
Whether this tooltip contains mouse. |
ToolTip for Qml objects.
Rich text is supported.
Using the tooltip is pretty easy. First of all register tooltip in your widget:
Then in yout qml import this widget:
And now you can use tooltip:
Definition at line 50 of file tooltipitem.h.
|
explicit |
Constructs the tooltip with the given parent item.
[in] | parent | The parent item for this tooltip. |
Definition at line 15 of file tooltipitem.cpp.
References showToolTip().
bool LC::Util::ToolTipItem::ContainsMouse | ( | ) | const |
Returns whether the tooltip contains the mouse.
Definition at line 40 of file tooltipitem.cpp.
|
signal |
Emitted when the containsMouse property changes.
References containsMouseChanged().
Referenced by containsMouseChanged(), hoverEnterEvent(), and hoverLeaveEvent().
QString LC::Util::ToolTipItem::GetText | ( | ) | const |
Returns the text of this tooltip.
Definition at line 35 of file tooltipitem.cpp.
|
overrideprotected |
Definition at line 50 of file tooltipitem.cpp.
References containsMouseChanged().
|
overrideprotected |
Definition at line 58 of file tooltipitem.cpp.
References containsMouseChanged().
void LC::Util::ToolTipItem::SetText | ( | const QString & | text | ) |
Sets the text contained in this tooltip to text.
[in] | text | The text of this tooltip. |
Definition at line 26 of file tooltipitem.cpp.
References text, and textChanged().
void LC::Util::ToolTipItem::ShowToolTip | ( | const QString & | text | ) | const |
Shows tooltip with the given text immediately.
The passed text overrides the text property of this tooltip, but does not change it.
Definition at line 45 of file tooltipitem.cpp.
References text.
Referenced by showToolTip().
|
slot |
Shows the tooltip immediately.
Definition at line 66 of file tooltipitem.cpp.
References ShowToolTip().
Referenced by ToolTipItem().
|
signal |
Emitted when the text of this tooltip changes.
References textChanged().
Referenced by SetText(), and textChanged().
|
read |
Whether this tooltip contains mouse.
Definition at line 60 of file tooltipitem.h.
|
readwrite |
The text of this tooltip item (rich text supported).
Definition at line 56 of file tooltipitem.h.
Referenced by SetText(), and ShowToolTip().