diff --git a/examples/Win32Demo/widget.ui b/examples/Win32Demo/widget.ui index 95b22b7..dde503b 100644 --- a/examples/Win32Demo/widget.ui +++ b/examples/Win32Demo/widget.ui @@ -125,13 +125,13 @@ 45 - 26 + 30 45 - 26 + 30 @@ -160,13 +160,13 @@ 45 - 26 + 30 45 - 26 + 30 @@ -195,13 +195,13 @@ 45 - 26 + 30 45 - 26 + 30 diff --git a/winnativeeventfilter.cpp b/winnativeeventfilter.cpp index 7dd35bb..341a2f4 100644 --- a/winnativeeventfilter.cpp +++ b/winnativeeventfilter.cpp @@ -2397,7 +2397,11 @@ bool WinNativeEventFilter::setBlurEffectEnabled(void *handle, // it will cover the blurred effect, so we need to // make the background become totally transparent. Achieve // this by setting a palette to the window. - widget->setPalette(enabled ? QPalette(Qt::transparent) : QPalette()); + QPalette palette = {}; + if (enabled) { + palette.setColor(QPalette::Window, Qt::transparent); + } + widget->setPalette(palette); } #endif if (isWin8OrGreater() && coreData()->m_lpSetWindowCompositionAttribute) {