转自 https://blog.csdn.net/zh15237774494/article/details/88855289
样式表(注意,这里的样式表,只是为了实现我的灰色风格,和滚动条没有关系,如果对这个不感兴趣的,可以跳过这个代码片)
/*************** QComboBox ******************/
QComboBox{
border-left:1pxsolidrgb(195,195,195);
border-right:1pxsolidrgb(195,195,195);
background:rgb(50,50,50);
color:white;
selection-background-color:rgb(80,52,158);
combobox-popup:0;
}
QComboBox:editable{
color:white;
font:20px;
}
QComboBox:enabled{
border:1pxsolidrgba(195,195,195,0);
selection-background-color:rgb(80,52,158);
}
QComboBoxQAbstractItemView{/*下拉框的显示框效果*/
border:1pxsolidrgb(195,195,195);
border:2px;
}
QComboBox::item:hover{
background-color:rgb(195,195,195);
}
QComboBo