[Python] PyQt5- handwriting window

Import SYS
 from PyQt5.QtWidgets Import The QMainWindow, the QApplication
 from PyQt5.QtGui Import QIcon 

class FirstMainWin (The QMainWindow):
     DEF  the __init__ (self, parent = None): 
        . Super (FirstMainWin, self) the __init__ (parent)
         # Main Window title 
        self .setWindowTitle ( " first application main window " ) 
        
        # sized 
        self.resize (400, 300 ) 

        # obtain status bar 
        self.status = self.statusBar ()
         # status bar displays the message,
        self.status.showMessage ( " there is only prompt 5s, everybody okay " , 5000 ) 

IF  __name__ == " __main__ " : 
    App = QApplication (sys.argv)
     # Import icon 
    app.setWindowIcon (QIcon ( " ./image/ lou.ico " )) 
    main = FirstMainWin ()
     # display window 
    main.show () 
     # established cycle 
    sys.exit (app.exec_ ())

 

 

 

Guess you like

Origin www.cnblogs.com/dandanduba/p/12462816.html