PythonBlurBehind
PythonBlurBehind copied to clipboard
cannot work with pyqt6 webengine
it works fine until i try to add a QWebEngineView, QWebEngineView just turns the whole window black my code:
from PyQt6.QtWidgets import QWidget, QMainWindow, QApplication
from PyQt6.QtWebEngineWidgets import QWebEngineView
from PyQt6.QtCore import QUrl
import sys
from BlurWindow.blurWindow import GlobalBlur
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setFixedSize(800, 600)
self.centralWidget = QWidget(self)
self.setCentralWidget(self.centralWidget)
GlobalBlur(self.winId(),Dark=False,Acrylic=False, QWidget=self)
self.setStyleSheet("background-color: rgba(0, 0, 0, 0)")
self.webEngineView = QWebEngineView(self.centralWidget)
self.webEngineView.setUrl(QUrl("https://www.google.com"))
self.webEngineView.setGeometry(0, 0, 400, 300)
if __name__ == "__main__":
app = QApplication(sys.argv)
window = MainWindow()
window.show()
sys.exit(app.exec())