Guest User

Untitled

a guest
Nov 8th, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. from PyQt5 import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
  2. import os
  3. path = os.path.join(os.getenv('APPDATA'), 'test')
  4. os.environ["QTWEBENGINE_CHROMIUM_FLAGS"] = f"--disable-gpu-shader-disk-cache,--disable-logging,--user-data-dir={path},--force-dark-mode"
  5. app = QtWidgets.QApplication(["--disable-gpu-shader-disk-cache",
  6.                               "--disable-logging",
  7.                               f"--user-data-dir={path}",
  8.                               "--force-dark-mode"])
  9. x = QtWebEngineWidgets.QWebEngineView()
  10. x.load(QtCore.QUrl('http://example.com/'))
  11. x.show()
  12. app.exec_()
Add Comment
Please, Sign In to add comment