tayser
0
Q:

pyqt5 hello world

import sys
from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel

# you can copy and run this code

class MainWindow(QMainWindow):
    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)
        self.setWindowTitle("Hello World")
        label = QLabel("Hello World", self)
        
        self.show()

if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = MainWindow()
    sys.exit(app.exec_())
0

New to Communities?

Join the community