summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/widgets/painting/gradients/gradients.cpp2
-rw-r--r--examples/widgets/tools/plugandpaint/app/paintarea.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/painting/gradients/gradients.cpp b/examples/widgets/painting/gradients/gradients.cpp
index 8df45be8d9..a4528ce06f 100644
--- a/examples/widgets/painting/gradients/gradients.cpp
+++ b/examples/widgets/painting/gradients/gradients.cpp
@@ -72,7 +72,7 @@ ShadeWidget::ShadeWidget(ShadeType type, QWidget *parent)
setPalette(pal);
} else {
- setAttribute(Qt::WA_NoBackground);
+ setAttribute(Qt::WA_OpaquePaintEvent);
}
QPolygonF points;
diff --git a/examples/widgets/tools/plugandpaint/app/paintarea.cpp b/examples/widgets/tools/plugandpaint/app/paintarea.cpp
index 4295e04cc0..e225d78398 100644
--- a/examples/widgets/tools/plugandpaint/app/paintarea.cpp
+++ b/examples/widgets/tools/plugandpaint/app/paintarea.cpp
@@ -59,7 +59,7 @@ PaintArea::PaintArea(QWidget *parent) :
QWidget(parent)
{
setAttribute(Qt::WA_StaticContents);
- setAttribute(Qt::WA_NoBackground);
+ setAttribute(Qt::WA_OpaquePaintEvent);
theImage.fill(qRgb(255, 255, 255));
}