Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@reasonset
Created October 17, 2019 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reasonset/f30cc19a4bae8ceb353176f84dbf68ae to your computer and use it in GitHub Desktop.
Save reasonset/f30cc19a4bae8ceb353176f84dbf68ae to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import sys
from PyQt5.QtCore import *
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWebEngineWidgets import *
app = QApplication(sys.argv)
web = QWebEngineView()
setty = QWebEngineView.settings(web)
setty.setFontFamily(QWebEngineSettings.StandardFont, "Source Han Sans JP")
setty.setFontFamily(QWebEngineSettings.SansSerifFont, "Source Han Serif JP")
setty.setFontFamily(QWebEngineSettings.SerifFont, "Source Han Serif JP")
setty.setAttribute(QWebEngineSettings.JavascriptEnabled, False)
setty.setAttribute(QWebEngineSettings.AutoLoadImages, False)
web.load(QUrl("https://ejje.weblio.jp/"))
web.show()
sys.exit(app.exec_())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment