Advertisement
ayiemedia

Python

Oct 26th, 2023
882
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. import sys
  2. from PyQt5.QtCore import *
  3. from PyQt5.QtWidgets import *
  4. from PyQt5.QtWebEngineWidgets import *
  5.  
  6. class WebBrowser(QMainWindow):
  7.     def __init__(self):
  8.         super().__init__()
  9.         self.browser = QWebEngineView()
  10.         self.browser.setUrl(QUrl("https://dapatbelajar.com"))
  11.         self.browser.setContextMenuPolicy(Qt.NoContextMenu)  # Disable context menu
  12.         self.setCentralWidget(self.browser)
  13.         self.setWindowTitle("xxx")
  14.         self.showMaximized()
  15.  
  16. app = QApplication(sys.argv)
  17. QApplication.setApplicationName("Web Browser")
  18. window = WebBrowser()
  19. app.exec_()
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement