Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PyQt5.QtWidgets import QMainWindow, QLabel, QApplication
- class MainWindow(QMainWindow):
- def __init__(self):
- super(MainWindow, self).__init__()
- self.window_configurations()
- self.frontend()
- def window_configurations(self):
- self.resize(500, 500)
- self.setWindowTitle("Hello World PyQt5 GUI")
- def frontend(self):
- label = QLabel(self)
- label.setText("Hello World")
- label.move(200, 200)
- label.show()
- def main():
- application = QApplication([])
- window = MainWindow()
- window.show()
- application.exec_()
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement