From 1648ccb8c49472d108d6bb8143a98f7e19bda272 Mon Sep 17 00:00:00 2001 From: gaozheng Date: Fri, 26 Jun 2026 16:13:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=E5=BC=82=E5=B8=B8=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=B5=AE=E5=B1=82=E5=9C=86=E8=A7=92=E5=A4=96=E9=9C=B2=E7=99=BD?= =?UTF-8?q?=E5=BA=95=20=E2=86=92=20WA=5FTranslucentBackground?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QLabel 默认不透明,QSS border-radius 只画圆角矩形,四角(圆角外三角区)露出 widget 白底色。 加 WA_TranslucentBackground → 圆角外透明(露画布),圆角矩形(深底0.85)正常。 构建:app 链接通过 --- src/app/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/main.cpp b/src/app/main.cpp index 9c8e59b..26e63dd 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -403,6 +403,7 @@ void buildWorkbench(QMainWindow& window, geopro::data::LocalSampleRepository& re auto* anomalyHint = new QLabel(vtkWidget); anomalyHint->setObjectName(QStringLiteral("anomalyHint")); anomalyHint->setAttribute(Qt::WA_TransparentForMouseEvents); + anomalyHint->setAttribute(Qt::WA_TranslucentBackground); // 圆角外透明(否则四角露白底) geopro::app::applyTokenizedStyleSheet( anomalyHint, QStringLiteral("QLabel#anomalyHint{background:rgba(10,18,30,0.85);color:#E6ECF5;"