summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_qpa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwidget_qpa.cpp')
-rw-r--r--src/gui/kernel/qwidget_qpa.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget_qpa.cpp b/src/gui/kernel/qwidget_qpa.cpp
index a9bfba6..c7ce99a 100644
--- a/src/gui/kernel/qwidget_qpa.cpp
+++ b/src/gui/kernel/qwidget_qpa.cpp
@@ -731,12 +731,19 @@ QPlatformWindowFormat QWidget::platformWindowFormat() const
{
Q_D(const QWidget);
+ QPlatformWindowFormat format;
+
QTLWExtra *extra = d->maybeTopData();
if (extra){
- return extra->platformWindowFormat;
+ format = extra->platformWindowFormat;
} else {
- return QPlatformWindowFormat::defaultFormat();
+ format = QPlatformWindowFormat::defaultFormat();
}
+
+ if (testAttribute(Qt::WA_TranslucentBackground))
+ format.setAlpha(true);
+
+ return format;
}
void QWidgetPrivate::createSysExtra()