Now I want to show some tips when my mouse hovered on some QTreeWidgetItem in QTreeWidget.
but the tips sometimes show and change well,but sometimes it does not changed,although
I have to change the position.
The porblem is:
when the mouse hovered on the first item,it should be show like "TipA";
and the second third item also show the tip "TipA".but the position should be changed!
but now,it didn't changed!
In QTooltip::showText,I find this code:
else if (!QTipLabel::instance->fadingOut){
// If the tip has changed, reuse the one
// that is showing (removes flickering)
if (QTipLabel::instance->tipChanged(pos, text, w)){
QTipLabel::instance->reuseTip(text);
QTipLabel::instance->setTipRect(w, rect);
QTipLabel::instance->placeTip(pos, w);
}
return;
}
else if (!QTipLabel::instance->fadingOut){
// If the tip has changed, reuse the one
// that is showing (removes flickering)
if (QTipLabel::instance->tipChanged(pos, text, w)){
QTipLabel::instance->reuseTip(text);
QTipLabel::instance->setTipRect(w, rect);
QTipLabel::instance->placeTip(pos, w);
}
return;
}
To copy to clipboard, switch view to plain text mode
if my tip contents didnot changed,it will be returned direct when I use QToolTip::showText();
so in function tipChanged,should add some judgement like pos!
Bookmarks