-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.py
34 lines (29 loc) · 864 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/python3
# Browser In PyQt
#
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWebEngineWidgets import *
import sys
class Window(QMainWindow):
def __init__(self):
super(Window,self).__init__()
self.setWindowTitle("Webbrowser")
self.setWindowIcon(QIcon("./icon/browser-icon.png"))
self.setGeometry(300,50,1400,800)
try:
self.browser = QWebEngineView(self)
self.browser.setUrl(QUrl("https://google.com"))
self.setCentralWidget(self.browser)
except (Exception,):
pass
def main():
app = QApplication(sys.argv)
app.setApplicationName("Webbrowser")
app.setApplicationVersion("v1.0")
window = Window()
window.show()
app.exec_()
if __name__ == "__main__":
main()