Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit b910da5

Browse files
committed
Fix code style issues with Black
1 parent 4427bab commit b910da5

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

projects/Browser/main.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,45 @@
44
from PyQt5.QtWebEngineWidgets import *
55
import sys
66

7+
78
# Define the main window class
89
class MainWindow(QMainWindow):
910
def __init__(self):
1011
super(MainWindow, self).__init__()
11-
12+
1213
# Create a QWebEngineView widget
1314
self.browser = QWebEngineView()
1415
self.browser.setUrl(QUrl("http://www.google.com"))
1516
self.setCentralWidget(self.browser)
16-
17+
1718
# Show the window maximized
1819
self.showMaximized()
19-
20+
2021
# Create a navigation toolbar
2122
navbar = QToolBar()
2223
navbar.adjustSize()
2324
self.addToolBar(navbar)
24-
25+
2526
# Add a back button to the toolbar
2627
back_btn = QAction("⮜", self)
2728
back_btn.triggered.connect(self.browser.back)
2829
navbar.addAction(back_btn)
29-
30+
3031
# Add a forward button to the toolbar
3132
forward_btn = QAction("⮞", self)
3233
forward_btn.triggered.connect(self.browser.forward)
3334
navbar.addAction(forward_btn)
34-
35+
3536
# Add a reload button to the toolbar
3637
reload_btn = QAction("⟳", self)
3738
reload_btn.triggered.connect(self.browser.reload)
3839
navbar.addAction(reload_btn)
39-
40+
4041
# Add a URL bar to the toolbar
4142
self.url_bar = QLineEdit()
4243
self.url_bar.returnPressed.connect(self.open_url)
4344
navbar.addWidget(self.url_bar)
44-
45+
4546
# Update the URL bar when the browser URL changes
4647
self.browser.urlChanged.connect(self.update_url)
4748

@@ -54,6 +55,7 @@ def open_url(self):
5455
def update_url(self, q):
5556
self.url_bar.setText(q.toString())
5657

58+
5759
# Create the application and main window
5860
app = QApplication(sys.argv)
5961
QApplication.setApplicationName("EFFLUX browser")

0 commit comments

Comments
 (0)