贴几个样式:
//<1>
m_ComboBox->setStyleSheet("QComboBox{"
"background-color:transparent;"
//"color:rgb(255,255,255);"
"border:1px solid #E2E6ED;" //226,230,237
"border-radius:3px;}"
//"border-top-left-radius:0px;"
//"border-top-right-radius:5px;"
//"border-bottom-left-radius:0px;"
//"border-bottom-right-radius:5px;}"
"QComboBox::drop-down{"
"background-color:transparent;"
"image:url(:/res/chevron-down.png);"
"width:26px;right:5px;}"
"QComboBox::drop-down:pressed {position: relative; top: 1px; left: 1px; }"
".QComboBox QAbstractItemView::item{"
//"font-family: PingFangSC-Regular;"
"font-size:14px;"
"min-height:33px;"
//"min-width:20px;"
//"min-height:30px;"
//"min-width:20px;"
"}"
m_ComboBox->setView(new QListView()); //才可使子项样式生效
//<2>