QT之qss教程-QTabWidget
来源:互联网 发布:node 构建项目 编辑:程序博客网 时间:2024/05/16 23:56
1、普通模式,如图
/* 向在移动 */QTabWidget::tab-bar {left:20px;}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:red;border-top-left-radius:4px;border-top-right-radius:4px;min-width:8px;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;}/* 标签未被选中时 */QTabBar::tab:!selected {margin-top:2px;}
2、被选中的标签,外框扩大,如图
QTabWidget::pane {border:4px solid #C3C7CB;}QTabWidget::tab-bar {left:20px;}/* 标签外形设置 */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;border-top-left-radius:4px;border-top-right-radius:4px;min-width:50px;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;}/* 标签未被选中时 */QTabBar::tab:!selected {margin-top:2px;}/* 标签被选中时,外框向外扩大 */QTabBar::tab:selected {margin-left:-4px;margin-right:-4px;}/* 最左边的标签被选中时,外框不变化 */QTabBar::tab:first:selected {margin-left:0px;}/* 最右边的标签被选中时,外框不变化 */QTabBar::tab:last:selected {margin-right:0;}
3、标签居中,如图
/* 把显示界面向上移动 */QTabWidget::pane {border-top:2px solid #C2C7CB;position:absolute;top:-10px;}/* 标签居中 */QTabWidget::tab-bar {alignment:center;}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;border-top-left-radius:4px;border-top-right-radius:4px;min-width:20px;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;}
阅读全文
0 0
- QT之qss教程-QTabWidget
- Qt---用qss描述QTabWidget
- QT之qss教程-qss文件使用方法
- 自学QT之qss教程
- QT之qss教程- QPushButton
- QT之qss教程- QCheckBox
- QT之qss教程-QComboBox
- QT之qss教程-QDockWidget
- QT之qss教程-QGroupBox
- QT之qss教程-QLineEdit
- QT之qss教程-QListView
- QT之qss教程-QMenuBar
- QT之qss教程-QProgressBar
- QT之qss教程- QRadioButton
- QT之qss教程- QScrollBar
- QT之qss教程-QSlider
- QT之qss教程-QSpinBox
- QT之qss教程-QTableView
- gfoj测试题
- 晋升为CSDN博客专家
- 2017秋招总结
- NDK_PROJECT_PATH = null
- Python如何实现两个服务器之间文件的上传
- QT之qss教程-QTabWidget
- 调整数组顺序使奇数位于偶数前面
- WebView爬坑之旅3--H5中选择本地文件
- 【C#】MemoryStream
- Image加载图片,设置图片,存入SD卡,所有方法
- 修改maven仓库为自己的私有仓库
- Estore电子商城 --- 知识的整合
- 2017VS2018年非工作日日期大集合
- 设计模式六大原则(5):迪米特法则