Chinaunix首页 | 论坛 | 博客
  • 博客访问: 538670
  • 博文数量: 108
  • 博客积分: 3242
  • 博客等级: 中校
  • 技术积分: 916
  • 用 户 组: 普通用户
  • 注册时间: 2010-09-07 11:46
文章分类
文章存档

2012年(13)

2010年(95)

分类: C/C++

2010-12-15 13:37:50

QTabWidget::pane { /* The tab widget frame */
         border-top: 2px solid #C2C7CB;
     }
 
     QTabWidget::tab-bar { /* move to the right by 5px */
         left: 5px;      }
 
     /* Style the tab using the tab sub-control. Note that
         it reads QTabBar _not_ QTabWidget */
     QTabBar::tab {
         background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                     stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
                                     stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
         border: 2px solid #C4C4C3;
         border-bottom-color: #C2C7CB;  /* same as the pane color */
         border-top-left-radius: 4px;
         border-top-right-radius: 4px;
         min-width: 8ex;
         padding: 2px;
     }
 
     QTabBar::tab:selected, QTabBar::tab:hover {
         background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                     stop: 0 #fafafa, stop: 0.4 #f4f4f4,
                                     stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);
     }
 
     QTabBar::tab:selected {
         border-color: #9B9B9B;
         border-bottom-color: #C2C7CB;  /* same as pane color */
     }
 
     QTabBar::tab:!selected {
         margin-top: 2px;  /* make non-selected tabs look smaller */
     }
 
 
 
     QTabWidget::pane {  /* The tab widget frame */
         border-top: 2px solid #C2C7CB;
     }
 
     QTabWidget::tab-bar {
         left: 5px;  /* move to the right by 5px */
     }
 
     /* Style the tab using the tab sub-control. Note that
         it reads QTabBar _not_ QTabWidget */
     QTabBar::tab {
         background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                     stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
                                     stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
         border: 2px solid #C4C4C3;
         border-bottom-color: #C2C7CB;  /* same as the pane color */
         border-top-left-radius: 4px;
         border-top-right-radius: 4px;
         min-width: 8ex;
         padding: 2px;
     }
 
     QTabBar::tab:selected, QTabBar::tab:hover {
         background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                     stop: 0 #fafafa, stop: 0.4 #f4f4f4,
                                     stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);
     }
 
     QTabBar::tab:selected {
         border-color: #9B9B9B;
         border-bottom-color: #C2C7CB;  /* same as pane color */
     }
 
     QTabBar::tab:!selected {
         margin-top: 2px;  /* make non-selected tabs look smaller */
     }
 
     /* make use of negative margins for overlapping tabs */
     QTabBar::tab:selected {
         /* expand/overlap to the left and right by 4px */
         margin-left: -4px;
         margin-right: -4px;
     }
 
     QTabBar::tab:first:selected {
         margin-left: 0;  /* the first selected tab has nothing to overlap with on the left */
     }
 
     QTabBar::tab:last:selected {
         margin-right: 0;  /* the last selected tab has nothing to overlap with on the right */
     }
 
  
     QTabBar::tab:only-one {
         margin: 0;  /* 如果只有一个页面, 我们不能重叠边缘  */
     }
 
QTabWidget::pane { /* The tab widget frame */
         border-top: 2px solid #C2C7CB;
         position: absolute;
         top: -0.5em;
     }
 
     QTabWidget::tab-bar {
         alignment: center;
     }
 
     /* Style the tab using the tab sub-control. Note that
         it reads QTabBar _not_ QTabWidget */
     QTabBar::tab {
         background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                     stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
                                     stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
         border: 2px solid #C4C4C3;
         border-bottom-color: #C2C7CB; /* same as the pane color */
         border-top-left-radius: 4px;
         border-top-right-radius: 4px;
         min-width: 8ex;
         padding: 2px;
     }
 
     QTabBar::tab:selected, QTabBar::tab:hover {
         background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                     stop: 0 #fafafa, stop: 0.4 #f4f4f4,
                                     stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);
     }
 
     QTabBar::tab:selected {
         border-color: #9B9B9B;
         border-bottom-color: #C2C7CB; /* same as pane color */
     }
 
定制QTableWidget
 
 
    下面将设置QTableWidget  的粉色选中区域, 与白色背景。
 
         QTableWidget {
         selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,
                                     stop: 0 #FF92BB, stop: 1 white);
     }
 
          QTableWidget QTableCornerButton::section {
         background: red;
         border: 2px outset red;
     }
阅读(7065) | 评论(1) | 转发(0) |
0

上一篇:QStatusBar

下一篇:QToolBox

给主人留下些什么吧!~~

chinaunix网友2010-12-16 14:38:37

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com