zoukankan      html  css  js  c++  java
  • 添加状态栏(显示状态信息)

    效果如下图:

    代码:

     1 """
     2 ZetCode PyQt5 tutorial
     3 This program creates a statusbar.
     4 """
     5 import sys
     6 from PyQt5.QtWidgets import QMainWindow, QApplication
     7 # The statusbar is created with the help of the QMainWindow widget.
     8 
     9 
    10 class Example(QMainWindow):
    11 
    12     def __init__(self):
    13         super().__init__()
    14 
    15         self.initUI()
    16 
    17 
    18     def initUI(self):
    19 
    20         # The showMessage() displays a message on the statusbar.
    21         self.statusBar().showMessage('Ready')
    22 
    23         self.setGeometry(300, 300, 250, 150)
    24         self.setWindowTitle('Statusbar')
    25         self.show()
    26 
    27 
    28 if __name__ == '__main__':
    29 
    30     app = QApplication(sys.argv)
    31     ex = Example()
    32     sys.exit(app.exec_())
  • 相关阅读:
    Javabean(MAX)
    电梯时间计算
    FT232R USB UART驱动安装
    java多态
    php文件上传代码
    $_FILES ERROR
    17
    php伪静态
    我的博客开通了!
    【省选划水记】我确实是在划水。
  • 原文地址:https://www.cnblogs.com/fuqia/p/8707343.html
Copyright © 2011-2022 走看看