From 15f3dc13a26f4bc10b27e66c170383904af960d2 Mon Sep 17 00:00:00 2001 From: ck Date: Wed, 16 Aug 2023 17:12:54 +0800 Subject: [PATCH] fix: DArrowRectangle background color abnormality Issue: https://github.com/linuxdeepin/developer-center/issues/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..eceb4d044 100644 --- a/src/widgets/dplatformwindowhandle.cpp +++ b/src/widgets/dplatformwindowhandle.cpp @@ -24,6 +24,10 @@ static QWindow *ensureWindowHandle(QWidget *widget) } window->setAttribute(Qt::WA_NativeWindow); + // FIX developer-center#5187 updateIsTranslucent + if (window->testAttribute(Qt::WA_TranslucentBackground)) + window->setAttribute(Qt::WA_OpaquePaintEvent); + handle = window->windowHandle(); window->setAttribute(Qt::WA_NativeWindow, false);