Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PyQt5 import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
- import os
- path = os.path.join(os.getenv('APPDATA'), 'test')
- os.environ["QTWEBENGINE_CHROMIUM_FLAGS"] = f"--disable-gpu-shader-disk-cache,--disable-logging,--user-data-dir={path},--force-dark-mode"
- app = QtWidgets.QApplication(["--disable-gpu-shader-disk-cache",
- "--disable-logging",
- f"--user-data-dir={path}",
- "--force-dark-mode"])
- x = QtWebEngineWidgets.QWebEngineView()
- x.load(QtCore.QUrl('http://example.com/'))
- x.show()
- app.exec_()
Add Comment
Please, Sign In to add comment