Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Author block
- __author__ = "Oda Winther (owinther@csumb.edu)"
- __date__ = "2/23/2020"
- __course__ = "Multimedia design and programming"
- __description__ = "Creating a GUI with a label with my name."
- import sys
- from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QVBoxLayout
- class my_name(QWidget):
- def __init__(self):
- super().__init__()
- self.label1 = QLabel('Oda Winther', self)
- vbox = QVBoxLayout()
- vbox.addWidget(self.label1)
- self.setLayout(vbox)
- self.setGeometry(100,100,600,400)
- self.show()
- app = QApplication(sys.argv)
- ex = my_name()
- sys.exit(app.exec_())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement