{
width: 400px; //整个组合框的宽度 设置后在ui编辑器中即可用看见效果
min-width: 250px;
max-width: 500px;
height: 600px;
border-radius: 3px;// 边框的圆角
border: 12px;
font-size: 12pt;
font-family: 微软雅黑,宋体;
background-repeat: no-repeat;
background-position: center left;
padding-left: 42px;
color: white; //该处的color是,组合框中的编辑框中文本的颜色。---------------------------------------
selection-color: black;
selection-background-color: darkgray;
}
QComboBox::drop-down //组合框右侧的下三角按钮
{
background-color: black; //该下三角按钮的背景色
min-width: 200px; //下三角按钮的最小宽度
}
/*
Descendant Selector | QDialog QPushButton | Matches all instances of QPushButton that are descendants (children, grandchildren, etc.) of aQDialog. |
*/
QComboBox QAbstractItemView
{
height:1000px;//下拉列表框的高度 即item所在的下拉列表区域-------------
border: 12px;
color: red; //组合框中的item的颜色 //跟QComboBox中的color区分开来-------------------------------------------
selection-color: green; //鼠标选中该item的颜色
selection-background-color: darkgrey; //鼠标选中该item的背景色
padding:30px,30px,30px,30px;//此处的效果是 listWidget部件与QCombox中edit编辑框的距离 以及 与 combobox底部的距离
}
QComboBox QAbstractItemView::item
{
height: 100px;
min-height:100px;
}