diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2023-05-16 09:51:50 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-05-16 15:55:49 +0000 |
commit | 47e63d436ea411431101f9d64d0365f02f15c82f (patch) | |
tree | 41639bdc0184cac384647b776a2ce81e7676111d /src/widgets/kernel/qwhatsthis.cpp | |
parent | 3cee2f195039420180ec0d5fafd560385802052c (diff) |
Don't grab QWhatsThis background on Windows
The workaround also is no longer needed on Windows so it can be removed
completely.
This patch amends 6a28b391f71d8626c1793aa3bf732dea10519653.
Task-number: QTBUG-113556
Pick-to: 6.5
Change-Id: I69155e54da26acd49faf72816d1439fb3e322de9
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/kernel/qwhatsthis.cpp')
-rw-r--r-- | src/widgets/kernel/qwhatsthis.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp index c3365e46db..c32645dfc4 100644 --- a/src/widgets/kernel/qwhatsthis.cpp +++ b/src/widgets/kernel/qwhatsthis.cpp @@ -110,9 +110,6 @@ public: static QWhatsThat *instance; protected: -#if defined(Q_OS_WIN) - void showEvent(QShowEvent *e) override; -#endif void mousePressEvent(QMouseEvent*) override; void mouseReleaseEvent(QMouseEvent*) override; void mouseMoveEvent(QMouseEvent*) override; @@ -125,9 +122,6 @@ private: QString text; QTextDocument* doc; QString anchor; -#if defined(Q_OS_WIN) - QPixmap background; -#endif }; QWhatsThat *QWhatsThat::instance = nullptr; @@ -201,13 +195,6 @@ QWhatsThat::~QWhatsThat() delete doc; } -#if defined(Q_OS_WIN) -void QWhatsThat::showEvent(QShowEvent *) -{ - background = QGuiApplication::primaryScreen()->grabWindow(0, x(), y(), width(), height()); -} -#endif - void QWhatsThat::mousePressEvent(QMouseEvent* e) { pressed = true; @@ -267,10 +254,6 @@ void QWhatsThat::paintEvent(QPaintEvent*) if (drawShadow) r.adjust(0, 0, -shadowWidth, -shadowWidth); QPainter p(this); -#if defined(Q_OS_WIN) - // Needed due to supposed lack of support for NoSystemBackground on Windows - p.drawPixmap(0, 0, background); -#endif p.setPen(QPen(palette().toolTipText(), 0)); p.setBrush(palette().toolTipBase()); p.drawRect(r); |