import sys from PyQt5.QtWidgets import QApplication, QMainWindow class Example(QMainWindow): def __init__(self): super().__init__() self.initUI() def initUI(self): self.statusBar().showMessage('状态栏上显示的消息') self.setGeometry(300, 300, 250, 150) self.setWindowTitle('状态栏') self.show() if __name__ == '__main__': app = QApplication(sys.argv) ex = Example() sys.exit((app.exec_()))
原文地址:http://blog.csdn.net/u013511642/article/details/45342641