-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindow.py
32 lines (23 loc) · 956 Bytes
/
window.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
from PySide6.QtWidgets import QMainWindow, QLabel, QVBoxLayout, QPushButton, QWidget
import webbrowser
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("Fudgify")
layout = QVBoxLayout()
label = QLabel("Fudgify is now running.")
label.setMargin(10)
layout.addWidget(label)
close_button = QPushButton("Open in browser")
close_button.pressed.connect(lambda: webbrowser.open("http://localhost:5001"))
layout.addWidget(close_button)
hide_button = QPushButton("Hide")
hide_button.pressed.connect(self.lower)
layout.addWidget(hide_button)
close_button = QPushButton("Quit")
close_button.pressed.connect(self.close) # type: ignore
layout.addWidget(close_button)
container = QWidget()
container.setLayout(layout)
self.setCentralWidget(container)
self.show()