pyqt5给状态栏增加信息

from PyQt5.QtWidgets import QStatusBar,QLabel

        self.statusBar=QStatusBar()
        self.setStatusBar(self.statusBar)
        self.comNum = QLabel('增加的消息')
        self.baudNum = QLabel(' ')
        self.statusBar.addPermanentWidget(self.comNum, stretch=3)
        self.statusBar.addPermanentWidget(self.baudNum,stretch=1)

 

你可能感兴趣的:(pyqt5)