alternate-background-color:交替行颜色 gridline-color:QTableView 中网格线的颜色 selection-color:所选文本或项目的前景色 selection-background-color:所选文本或项目的背景色 4.8 文本样式 outline:轮廓属性 outline-color:设置一个元素轮廓的颜色 outline-offset:设置 outline 与元素边缘或边框之间的间隙 outline-st...
selection-color: white; //选泽时的字体颜色 selection-//选泽时的背景颜色 color : black;//未被选择的字体颜色 border: 0px; outline:0px; //去掉虚线 } QRadioButton{ //设置QRadioButton的字体颜色 color : white; } QRadioButton::indicator::unchecked{ //当radiobutton不被选中是的圆圈图片 image...
alternate-background-color:交替行颜色 gridline-color:QTableView 中网格线的颜色 selection-color:所选文本或项目的前景色 selection-background-color:所选文本或项目的背景色 4.8 文本样式 outline:轮廓属性 outline-color:设置一个元素轮廓的颜色 outline-offset:设置 outline 与元素边缘或边框之间的间隙 outline-st...
selection-color:#DCDCDC;*/ 1. color : white;//文本颜色,ComboBox上显示的,不是item里的 1. } 1. QComboBox::down-arrow{//设置combox 的下三角 style 1. image:url(:/psblack/add_bottom.png); //设置图片 1. width:10px; 1. height:10px; 1. right:2px; 1. } 1. QComboBox::drop-...
selection-color:write; /*选择后的背景颜色*/ selection-background-color:rgb(,,); /*灰色,2像素宽的凹槽边框*/ border:2pxgroove red; /*设置编辑框为圆角,半径为10*/ border-radius:10px; padding:2px4px; } /* ListView的填充 */ QListView{ ...
border-color: darkkhaki; border-style: solid; border-radius: 2; } QComboBox, QLineEdit, QSpinBox, QTextEdit, QListView { background-color: cornsilk; selection-color: #0a214c; selection-background-color: #C19A6B; } QComboBox::drop-down#name{ image:url(:/res/drop_down.jpg); } QLi...
被选中的内容部分的前景色和背景需要通过属性selection-color和selection-background-color控制。 在QTableView控件可作为一个QAbstractButton实现,还可以使用 “QTableView QTableCornerButton::section“选择器选择后控制样式。 表格颜色使用属性gridline-color。 背景可滚动,可参照QAbstractScrollArea窗口部件。 示例1:QTableVie...
/*子控件选择器*/QAbstractItemView:disabled{background-color:rgba(255,255,255,0);selection-color:white;selection-background-color:rgba(193,231,255,0);font-size:20px;}/*复合控件选择器*/QCheckBox::indicator{width:40px;height:40px;} 部分控件在不同状态下可以来进行样式改变。
/* altermate-background生效条件: ui->listView->setAlternatingRowColors(true); */ /* 此处alternate-background-color: yellow会被QListView::item:alternate覆盖*/ QListView { alternate-background-color: yellow; } QListView { show-decoration-selected: 1; /* make the selection span the entire ...
color: #4C4C4C; font - family: Microsoft YaHei; alternate- /*行交替颜色*/ selection-background-color: #E9F2FE; /*选中行背景颜色*/ } QTableWidget#tableWidget::Item:selected { background:#4C99F8; } QTableWidget表头属性设置 QHeaderView::section{ ...