社区
Qt
帖子详情
tab设置样式无效呢?
一如当初
2013-05-28 10:53:20
我这样设置的QSS样式表,但是字体颜色也好,背景色也好都没有改变
我想是我选择子控件选错了,但不知道正确的怎么写
...全文
367
5
打赏
收藏
tab设置样式无效呢?
我这样设置的QSS样式表,但是字体颜色也好,背景色也好都没有改变 我想是我选择子控件选错了,但不知道正确的怎么写
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
zhxianbin
2013-05-29
打赏
举报
回复
http://qt-project.org/doc/qt-4.8/stylesheet-examples.html
zengcccc
2013-05-29
打赏
举报
回复
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 */ } 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; /* if there is only one tab, we don't want overlapping margins */ } 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 */ } QTabBar::tear { image: url(tear_indicator.png); } QTabBar::scroller { /* the width of the scroll buttons */ width: 20px; } QTabBar QToolButton { /* the scroll buttons are tool buttons */ border-image: url(scrollbutton.png) 2; border-width: 2px; } QTabBar QToolButton::right-arrow { /* the arrow mark in the tool buttons */ image: url(rightarrow.png); } QTabBar QToolButton::left-arrow { image: url(leftarrow.png); }
一如当初
2013-05-29
打赏
举报
回复
引用 2 楼 hai200501019 的回复:
不好意思,小写 QTabWidget::tab { }
大小写都没有效果。
海的神话
2013-05-28
打赏
举报
回复
不好意思,小写 QTabWidget::tab { }
海的神话
2013-05-28
打赏
举报
回复
QTabWidget::Tab { } 试试看
在vue中使用el-
tab
-pane v-show/v-if
无效
的解决
<el-
tab
-pane label="广告位
设置
" name="bannerset">广告位
设置
</el-
tab
-pane> <el-
tab
-pane label="推送
设置
" name="sendset">推送
设置
</el-
tab
-pane> <el-
tab
-pane label="权限管理" name="authset">权限管理...
蓝色登录页面带
tab
切换效果.zip
比如,可以使用CSS来
设置
tab
的
样式
,使得当前激活的
tab
与非激活的
tab
在视觉上有所区分,同时也要确保表单内容区域在切换时有平滑的过渡效果,以提高用户体验。 在JavaScript方面,使用Jquery可以轻松地绑定点击事件...
Flex 组件
样式
- **定义**:
设置
Tab
中主体内容的边框
样式
。 - **可选项**:none, solid, inset, outset。 - **borderColor 边框颜色** - **定义**:
设置
Tab
中主体内容的边框颜色。 - **用法**:直接指定颜色值。 以上是关于...
html解决
tab
le
设置
宽度
无效
的问题
如果对
tab
le
设置
tab
le-layer:fixed
样式
后,发现表格中有一行合并过,其它没有合并的行的列宽会平均化,对列宽的
设置
会失效。 解决方法: 在tbody前面加 .detail { padding-bottom: 50px; margin-top
解决elementUI 切换
tab
后 el_
tab
le 固定列下方多了一条线问题
由于固定列的DOM元素是ElementUI生成的,并且有内联
样式
覆盖,所以直接通过类选择器修改
样式
可能
无效
。我们需要利用`/deep/`或`>>>`(Vue 2.x中的深度选择器)来穿透组件的
样式
隔离层,然后
设置
`height: 100% !...
Qt
21,466
社区成员
26,689
社区内容
发帖
与我相关
我的任务
Qt
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
复制链接
扫一扫
分享
社区描述
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章