pyqt qlabel hide
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QLabel class MyApp(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): self.layout = QVBoxLayout() self.setLayout(self.layout) # 创建一个QLabel并添加到布局中 self.label = QLabel("Hello World!") self.layout.addWidget(self.label) # 隐藏QLabel self.label.hide() if __name__ == '__main__': app = QApplication([]) ex = MyApp() ex.show() app.exec_()
##############
标签:__,hide,self,pyqt,label,qlabel,QLabel From: https://www.cnblogs.com/herd/p/17827367.html