Display tooltips on the correct screen
Display QTipLabel on the correct screen, also when the
parent widget spans multiple screens. In this case,
QWidget::screen() will return the main screen for the
widget, which will not necessarily be the screen at
the tool tip position.
Fixes regression introduced by 7e2fded5
.
Change-Id: Iffb920b6658468c5032928eadbd749f58fe077a7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
07466a52c6
commit
074f71cfda
@ -361,7 +361,9 @@ bool QTipLabel::eventFilter(QObject *o, QEvent *e)
|
||||
|
||||
QScreen *QTipLabel::getTipScreen(const QPoint &pos, QWidget *w)
|
||||
{
|
||||
return w ? w->screen() : QGuiApplication::primaryScreen()->virtualSiblingAt(pos);
|
||||
QScreen *guess = w ? w->screen() : QGuiApplication::primaryScreen();
|
||||
QScreen *exact = guess->virtualSiblingAt(pos);
|
||||
return exact ? exact : guess;
|
||||
}
|
||||
|
||||
void QTipLabel::placeTip(const QPoint &pos, QWidget *w)
|
||||
|
Loading…
Reference in New Issue
Block a user