• 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) 
    
  • 相关阅读:
    IOS:兼容ios6和低版本
    iOS开发~sizeClass和autolayout
    iOS开发~即时通讯工具参考的一些开源框架和教程
    移动开发网站导航
    mac工具总结
    推送总结(重要)
    IOS常用学习网站和博客
    iOS~静态库开发
    iOS~视频开发
    iOS~视频编码转换
  • 原文地址:https://www.cnblogs.com/ribavnu/p/4661777.html
Copyright © 2020-2023  润新知