以下成员源于类 QToolTip are part of the Qt compatibility layer. We advise against using them in new code.
| void | add (QWidget * widget , const QString & text ) |
| void | add (QWidget * widget , const QRect & rect , const QString & text ) |
| void | remove (QWidget * widget ) |
[static]
void
QToolTip::
add
(
QWidget
*
widget
, const
QString
&
text
)
使用 QWidget::setToolTip () 代替。
例如,若有代码像
tip->add(widget, text);
可以把它重写成
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
)
使用 QWidget::setToolTip () 代替。
例如,若有代码像
tip->remove(widget);
可以把它重写成
widget->setToolTip("");