diff options
author | Sergio Martins <sergio.martins@kdab.com> | 2016-11-21 19:16:31 +0000 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2017-07-19 14:21:52 +0000 |
commit | 29f6b507325862fe3dd728913b5911f8edde9d35 (patch) | |
tree | 7597acd5c77d9a1a6bd1cbf858e08b4c88173822 /src | |
parent | 94cf203f36deb5b46d47197d31b780de5f464937 (diff) |
Windows: Don't raise inactive windows when showing a tooltip
The Qt4 Q_WS_WIN ifdef never got ported.
Change-Id: Iad1ca1a3e20bd5254895781eee09897520b7d7d1
Task-Id: QTBUG-39147
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/kernel/qtooltip.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/kernel/qtooltip.cpp b/src/widgets/kernel/qtooltip.cpp index 48afeb1dcc..830a328948 100644 --- a/src/widgets/kernel/qtooltip.cpp +++ b/src/widgets/kernel/qtooltip.cpp @@ -493,12 +493,12 @@ void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, cons } if (!text.isEmpty()){ // no tip can be reused, create new tip: -#if 1 // Used to be excluded in Qt4 for Q_WS_WIN - new QTipLabel(text, w, msecDisplayTime); // sets QTipLabel::instance to itself -#else +#ifdef Q_OS_WIN32 // On windows, we can't use the widget as parent otherwise the window will be // raised when the tooltip will be shown new QTipLabel(text, QApplication::desktop()->screen(QTipLabel::getTipScreen(pos, w)), msecDisplayTime); +#else + new QTipLabel(text, w, msecDisplayTime); // sets QTipLabel::instance to itself #endif QTipLabel::instance->setTipRect(w, rect); QTipLabel::instance->placeTip(pos, w); |