Qt WebEngineView 设置透明

458 阅读1分钟

qml

WebEngineView {
    backgroundColor: "transparent"
}

pyside6

webview = QWebEngineView()
webview.page().setBackgroundColor(Qt.GlobalColor.transparent)
webview.setStyleSheet("background-color: transparent")