!19 bugfix:#I79FD0【文件管理器】【wayland】侧边栏悬停显示位置不正确

Merge pull request !19 from Augenblick/openkylin/nile
This commit is contained in:
Augenblick 2023-11-08 09:36:55 +00:00 committed by Gitee
commit dea32bfb1f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 9 additions and 8 deletions

View File

@ -508,14 +508,15 @@ void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, cons
else if (!QTipLabel::instance->fadingOut){
// If the tip has changed, reuse the one
// that is showing (removes flickering)
QPoint localPos = pos;
if (w)
localPos = w->mapFromGlobal(pos);
if (QTipLabel::instance->tipChanged(localPos, text, w)){
QTipLabel::instance->reuseTip(text, msecDisplayTime, pos);
QTipLabel::instance->setTipRect(w, rect);
QTipLabel::instance->placeTip(pos, w);
}
// QPoint localPos = pos;
// if (w)
// localPos = w->mapFromGlobal(pos);
// if (QTipLabel::instance->tipChanged(localPos, text, w)){
// QTipLabel::instance->reuseTip(text, msecDisplayTime, pos);
// QTipLabel::instance->setTipRect(w, rect);
// QTipLabel::instance->placeTip(pos, w);
// }
QTipLabel::instance->hideTip();
return;
}
}