Advertisement

PyQt5菜单及工具栏与主窗口(7)

阅读量:

研读《PyQt4入门指南 PDF中文版.pdf》过程中所整理的学习记录

主窗口

**** QMainWindow类用于构建应用程序的核心界面。借助此类,能够生成一个集成状态栏、工具栏以及菜单栏的典型应用架构。

状态栏

**** 状态栏作为一种串口组件,主要用于展示各类状态信息。

复制代码
  <span style="font-size:14px;">#!/usr/bin/python

    
 # statusbar.py
    
 from PyQt5.QtWidgets import QApplication
    
 from PyQt5 import QtWidgets
    
  
    
 class MainWindow(QtWidgets.QMainWindow):
    
     def __init__(self,  parent= None):
    
     QtWidgets.QMainWindow.__init__(self)
    
     
    
     self.resize(250,  150)

全部评论 (0)

还没有任何评论哟~