(4):QTabWidget控件⼀.说明:
1.该组件是⼀个可切换⾯板的组件,主要提供⾯板重叠,达到节省空间的⽬的。
2.通常会隐藏标签,只提供pane供显⽰。
3.主要组成部分:
标签(tab-bar):即点击进⾏切换的⼩按钮
⾯板(pane):即装载被添加组件的容器,是显⽰内容的容器。
4.组件的QSS样式设置,主要是选择器:
QTabWidget/QTabWidget::pane/QTabBar::tab/QTabWidget::tab-bar
QTabWidget {
background: #16181c;
border: none;
margin-right: 5px;
}
QTabWidget::pane {
background: #16181c;
border-top: 1px solid #B82525;
padding-top: 10px;
}
QTabBar::tab{
margin-left: 25px;
width: 70px;
padding: 10px;
color: gray;
font-size: 13px;
font-weight: bold;
background: #16181c;
}
QTabBar::tab:hover{
color: #DCDDE4;
}
QTabBar::tab:selected{
background: #B82525;
color: #DCDDE4;
}
QTabWidget::tab-bar{
alignment: right;
}
⼆.主要函数:
属性:
58 properties inherited from QWidget
1 property inherited from QObject
公有函数:
可重载公共函数:
220 public functions inherited from QWidget
29 public functions inherited from QObject
12 public functions inherited from QPaintDevice 公共槽:
19 public slots inherited from QWidget
1 public slot inherited from QObject Signals
1 signal inherited from QWidget
1 signal inherited from QObject
保护成员函数:
可重载保护成员函数:
37 protected functions inherited from QWidget
8 protected functions inherited from QObject
1 protected function inherited from QPaintDevice Additional Inherited Members
position标签属性4 static public members inherited from QWidget
7 static public members inherited from QObject
1 protected slot inherited from QWidget
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论