Compatibility Members for QToolTip
The following members of class QToolTipare part of the Qt compatibility layer. We advise against using them in new code.
Static Public Members
void | add(QWidget * widget, const QString & text) |
void | add(QWidget * widget, const QRect & rect, const QString & text) |
void | remove(QWidget * widget) |
Member Function Documentation
[static]
void QToolTip::add(QWidget * widget, const QString & text)
Use QWidget::setToolTip() instead.
For example, if you have code like
tip->add(widget, text);
you can rewrite it as
widget->setToolTip(text);
[static]
void QToolTip::add(QWidget * widget, const QRect & rect, const QString & text)
Intercept the QEvent::ToolTip events in your widget's QWidget::event() function and call QToolTip::showText() with the text you want to display. The Tooltips example illustrates this technique.
[static]
void QToolTip::remove(QWidget * widget)
Use QWidget::setToolTip() instead.
For example, if you have code like
tip->remove(widget);
you can rewrite it as
widget->setToolTip("");
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.