summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-08-15 21:48:05 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-09-12 21:40:11 +0000
commitda2e47edb0829df86c1bebc8969527eb71973293 (patch)
tree3ddf0ad9346635e5b9e6ef0ccd2811e3cec60b0a
parentafbc0c7267f0058e2738eb0671c458ec02ab860d (diff)
embeddedwindows: Fill bounds, instead of event rect
The event might come from a partial expose, but we want to fill the entire bounds of the window, as we're filling with a gradient. Change-Id: I66cedb160fb0ed06935c06ba2fe5dec9ed468833 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit 61c043333b255afcd83260b78027242fc27a2e83) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/manual/embeddedwindows/main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/manual/embeddedwindows/main.cpp b/tests/manual/embeddedwindows/main.cpp
index db91d90387..98f40e358c 100644
--- a/tests/manual/embeddedwindows/main.cpp
+++ b/tests/manual/embeddedwindows/main.cpp
@@ -29,11 +29,12 @@ protected:
update();
}
- void paintEvent(QPaintEvent *event) override
+ void paintEvent(QPaintEvent *) override
{
QPainter painter(this);
painter.setCompositionMode(QPainter::CompositionMode_Source);
- painter.fillRect(event->rect(), m_pressed ? QGradient(QGradient::JuicyPeach) : m_brush);
+ painter.fillRect(QRect(0, 0, width(), height()),
+ m_pressed ? QGradient(QGradient::JuicyPeach) : m_brush);
}
private: