void KToolTipItem::setData(int role, const QVariant &data)
{
d->map[role] = data;
+ KToolTipManager::instance()->update();
}
else
path.addRect(option->rect.adjusted(0, 0, -1, -1));
-#if QT_VERSION >= 0x040400
QColor color = option->palette.color(QPalette::ToolTipBase);
-#else
- QColor color = option->palette.color(QPalette::Base);
-#endif
QColor from = color.lighter(105);
QColor to = color.darker(120);
hideTip();
label->showTip(pos, item);
currentItem = item;
+ m_tooltipPos = pos;
}
void KToolTipManager::hideTip()
m_delegate = delegate;
}
+void KToolTipManager::update()
+{
+ if (currentItem == 0)
+ return;
+ label->showTip(m_tooltipPos, currentItem);
+}
+
KToolTipDelegate *KToolTipManager::delegate() const
{
return m_delegate;