zhiyiYo / PyQt-Fluent-Widgets

A fluent design widgets library based on C++ Qt/PyQt/PySide. Make Qt Great Again.
https://qfluentwidgets.com
GNU General Public License v3.0
4.99k stars 464 forks source link

[Bug]: 主窗口没有阴影 #897

Closed shiyueGG closed 1 week ago

shiyueGG commented 3 weeks ago

What happened?

在官方的demo是有阴影的,我创建之后没有。是需要自己加吗?

image

image

Operation System

Win11

Python Version

3.10.8

PyQt/PySide Version

pyside6 6.7.1

PyQt/PySide-Fluent-Widgets Version

pyside6 6.7.1

How to Reproduce?

Minimum code

shiyueGG commented 3 weeks ago

原因是初始化了下面这段代码 这是什么原因 `class webWidget(QFrame): def init(self, parent=None): super().init(parent=parent)

    # 1. 将 QWebEngineView 替换成 FramelessWebEngineView
    self.webView = FramelessWebEngineView(self)
    self.webView.load(QUrl("https://www.baidu.com/"))

    self.vBoxLayout = QVBoxLayout(self)
    self.vBoxLayout.setContentsMargins(20, 20, 20, 20)
    self.vBoxLayout.addWidget(self.webView)
    self.setObjectName("homeInterface--web")`
zhiyiYo commented 1 week ago

官网文档写了