-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
20 lines (16 loc) · 503 Bytes
/
app.py
File metadata and controls
20 lines (16 loc) · 503 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QVBoxLayout
class HelloWindow(QWidget):
def __init__(self):
super().__init__()
self.setWindowTitle("Hello PyQt5")
self.setGeometry(100, 100, 300, 100)
layout = QVBoxLayout()
label = QLabel("Hello from PyQt5!")
layout.addWidget(label)
self.setLayout(layout)
if __name__ == "__main__":
app = QApplication(sys.argv)
window = HelloWindow()
window.show()
sys.exit(app.exec_())