From 35c00937d1b55a37a86f71871b3658dfbe6f8d3a Mon Sep 17 00:00:00 2001 From: ck Date: Thu, 17 Aug 2023 12:30:06 +0800 Subject: [PATCH] fix: DArrowRectangle background color abnormality Issue: linuxdeepin/developer-center#5187 Bug: https://pms.uniontech.com/bug-view-211649.html --- src/widgets/dplatformwindowhandle.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/widgets/dplatformwindowhandle.cpp b/src/widgets/dplatformwindowhandle.cpp index 3de8ec6db..dc4c2be78 100644 --- a/src/widgets/dplatformwindowhandle.cpp +++ b/src/widgets/dplatformwindowhandle.cpp @@ -27,6 +27,10 @@ static QWindow *ensureWindowHandle(QWidget *widget) handle = window->windowHandle(); window->setAttribute(Qt::WA_NativeWindow, false); + // FIX developer-center#5187 updateIsTranslucent + if (window->testAttribute(Qt::WA_TranslucentBackground)) + window->setAttribute(Qt::WA_OpaquePaintEvent); + // dxcb version >= 1.1.6 if (!DPlatformWindowHandle::pluginVersion().isEmpty()) { /// TODO: Avoid call parentWidget()->enforceNativeChildren().