【发布时间】:2016-09-14 12:59:03
【问题描述】:
我需要你的建议。 (对不起我的工程师。我希望你能理解我)
1) 我想创建自定义 TabWidget 并使用 QSS。现在它看起来像这样:
我想在标签下填充背景(我接受名为 autoFillBackground 的属性)。它需要看起来像这样:
2) 当我开始拖放选项卡时,此选项卡填充为白色。当我放下选项卡时,此选项卡设置自定义 qss。
我想在拖放选项卡时更改样式。 谢谢
(我在看qss手册)
一些代码
QTabWidget::tab-bar {
background-color: black;
}
QTabBar::tab {
background-color: #4094da;
border-color:white;
font: bold 12px 'Arial';
color: white;
height:60px;
}
QTabBar::tab:!selected {
background-color: #9E9E9E;
color: white;
}
QTabBar::close-button {
background-position: center;
background-image: url(":/Appearance/close_chat_item");
}
QTabWidget::pane {
position: absolute;
}
QTabBar::tab:selected {
border-color:#4094da;
background-color: #4094da;
color: white;
}
【问题讨论】:
-
你能贴一些你试过的代码吗?
-
当然!我更新问题
标签: qt qtstylesheets qtabwidget