Home · Modules · Classes · Namespaces · Functions

QxtToolTip Class Reference
[QxtGui module]

The QxtToolTip class provides means for showing any arbitrary widget as a tooltip. More...

    #include <QxtToolTip>

Static Public Members


Detailed Description

The QxtToolTip class provides means for showing any arbitrary widget as a tooltip.

QxtToolTip provides means for showing any arbitrary widget as a tooltip.

Note: The rich text support of QToolTip already makes it possible to show heavily customized tooltips with lists, tables, embedded images and such. However, for example dynamically created images like thumbnails cause problems. Basically the only way is to dump the thumbnail to a temporary file to be able to embed it into HTML. This is where QxtToolTip steps in. A generated thumbnail may simply be set on a QLabel which is then shown as a tooltip. Yet another use case is a tooltip with dynamically changing content.

"QxtToolTip in action."

Warning: Added tooltip widgets remain in the memory for the lifetime of the application or until they are removed/deleted. Do NOT flood your application up with lots of complex tooltip widgets or it will end up being a resource hog. QToolTip is sufficient for most of the cases!


Member Function Documentation

void QxtToolTip::hide ()   [static]

Hides the tooltip.

See also show().

int QxtToolTip::margin ()   [static]

Returns the margin of the tooltip.

See also setMargin().

qreal QxtToolTip::opacity ()   [static]

Returns the opacity level of the tooltip.

See also setOpacity() and QWidget::windowOpacity().

void QxtToolTip::setMargin ( int margin )   [static]

Sets the margin of the tooltip.

The default value is QStyle::PM_ToolTipLabelFrameWidth.

See also margin().

void QxtToolTip::setOpacity ( qreal level )   [static]

Sets the opacity level of the tooltip.

The default value is QStyle::SH_ToolTipLabel_Opacity.

See also opacity() and QWidget::setWindowOpacity().

void QxtToolTip::setToolTip ( QWidget * parent, QWidget * tooltip, const QRect & rect = QRect() )   [static]

Sets the tooltip to be shown for parent. An optional rect may also be passed.

See also toolTip().

void QxtToolTip::setToolTipRect ( QWidget * parent, const QRect & rect )   [static]

Sets the rect on which tooltip is shown for parent.

See also toolTipRect().

void QxtToolTip::show ( const QPoint & pos, QWidget * tooltip, QWidget * parent = 0, const QRect & rect = QRect() )   [static]

Shows the tooltip at pos for parent at rect.

See also hide().

QWidget * QxtToolTip::toolTip ( QWidget * parent )   [static]

Returns the tooltip for parent.

See also setToolTip().

QRect QxtToolTip::toolTipRect ( QWidget * parent )   [static]

Returns the rect on which tooltip is shown for parent.

See also setToolTipRect().


Copyright © 2007-2011 Qxt Foundation
Qxt 0.6.2