Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- from PyQt5.QtCore import *
- from PyQt5.QtWidgets import *
- from PyQt5.QtWebEngineWidgets import *
- class WebBrowser(QMainWindow):
- def __init__(self):
- super().__init__()
- self.browser = QWebEngineView()
- self.browser.setUrl(QUrl("https://dapatbelajar.com"))
- self.browser.setContextMenuPolicy(Qt.NoContextMenu) # Disable context menu
- self.setCentralWidget(self.browser)
- self.setWindowTitle("xxx")
- self.showMaximized()
- app = QApplication(sys.argv)
- QApplication.setApplicationName("Web Browser")
- window = WebBrowser()
- app.exec_()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement