Article From:https://www.cnblogs.com/ygzhaof/p/9732520.html
 1 from PyQt5.QtWidgets import QApplication,QMainWindow
 2 import sys
 3 #demo_6show the status bar
 4 class Example(QMainWindow):
 5     def __init__(self):
 6         super().__init__()
 7         self.initUI()
 8 
 9     def initUI(self):
10         self.statusBar().showMessage('ready')#Set the message displayed in the status bar
11         self.setGeometry(300, 300, 250, 150) #Setting window size and location
12         self.setWindowTitle('Statusbar')#Text
13         self.show()
14 
15 if __name__=='__main__':
16     app=QApplication(sys.argv)
17     e=Example()
18     sys.exit(app.exec())

 

Leave a Reply

Your email address will not be published. Required fields are marked *