| 1234567891011121314151617181920212223242526272829303132 |
- # 状态栏
- import sys
- from PyQt6.QtWidgets import QMainWindow, QApplication
-
-
- class Example(QMainWindow):
-
- def __init__(self):
- super().__init__()
-
- self.initUI()
-
-
- def initUI(self):
-
- self.statusBar().showMessage('statusBar')
-
- self.setGeometry(300, 300, 350, 250)
- self.setWindowTitle('Statusbar')
- self.show()
-
-
- def main():
-
- app = QApplication(sys.argv)
- ex = Example()
- sys.exit(app.exec())
-
-
- if __name__ == '__main__':
- main()
|