Andreas Haferburg
Andreas Haferburg

Reputation: 5520

After calling setToolTip(), how to update the tooltip if it is already visible?

I call QTreeWidgetItem::setToolTip() because the underlying data has changed. This works fine if the tooltip is triggered afterwards. However, if the tooltip is already visible, the text is not changed. The user would have to move the mouse away, then back to re-trigger the tooltip.

How can I get Qt (4.8) to update the text of the tooltip if it is already visible?

Upvotes: 0

Views: 245

Answers (1)

chehrlic
chehrlic

Reputation: 958

The change of Qt::ToolTipRole is not honored by the itemview as described in the documentation. See also the bug report about this: https://bugreports.qt.io/browse/QTBUG-78726 - There you can also find a workaround for it.

/edit: fixed typo

Upvotes: 2

Related Questions