zoukankan      html  css  js  c++  java
  • QWidget切换

    QWidget切换,参考类:QstackedLayout,QStackedWidget,QTabWidget

    一、Tab出现的位置
    tabWidget.setTabPosition(QTabWidget.South);
    
    enum QTabWidget::TabPosition
    
    This enum type defines where QTabWidget draws the tab row:
    
    	Constant		 Value			Description
    QTabWidget::North		0		The tabs are drawn above the pages.
    QTabWidget::South		1		The tabs are drawn below the pages.
    QTabWidget::West		2		The tabs are drawn to the left of the pages.
    QTabWidget::East		3		The tabs are drawn to the right of the pages.
    
    
    二、Tab的形状
    tabWidget.setTabShape(QTabWidget::Triangular)
    
    enum QTabWidget::TabShape
    
    This enum type defines the shape of the tabs:
    
    	Constant				Value				Description
    QTabWidget::Rounded		 	  0			The tabs are drawn with a rounded look. This is the default shape.
    QTabWidget::Triangular	 	  1			The tabs are drawn with a triangular look.
    

    QMainWindow的多个QDockWidget停靠在一起

    在QMainWindow中
    
    dock4=QDockWidget(self.tr("停靠窗口4"),self)  
            dock4.setFeatures(QDockWidget.DockWidgetFloatable|QDockWidget.DockWidgetClosable)  
    # 可引入外部Qwidget
    widget4 = QWidget()  
    dock4.setWidget(widget4)  
    self.addDockWidget(Qt.RightDockWidgetArea,dock4)  
    
    
    #多个QDockWidget,每两两停靠在一起可以实现多个QDockWidget的停靠在一起
    #两个停靠窗口叠加
    self.tabifyDockWidget(dock4, dock5) 
    self.tabifyDockWidget(dock2, dock4) 
    
  • 相关阅读:
    教你修改Linux下高并发socket最大连接数所受的各种限制
    nginx浏览pdf
    Spring3 M2 quartz-2.1.7 解决bean不能注入问题
    DCSync
    Linux下python2.7安装pip
    ._cache_问题
    php-mvc概念
    php第十天-面向对象命名空间
    php第九天-session/cookice会话控制
    fastadmin V1.0.0.20200506_beta 漏洞复现
  • 原文地址:https://www.cnblogs.com/ribavnu/p/4661777.html
Copyright © 2011-2022 走看看