QComboBox *cmBox = new QComboBox();
cmBox->setStyleSheet("QComboBox{font-family:'微软雅黑';font-size:9; border:1px solid lightgray;}"
"QComboBox QAbstractItemView::item {min-height: 20px;}"
"QComboBox::drop-down{border-left-width: 1px;border-left-color: lightgray;border-left-style: solid; border-top-right-radius: 3px;border-bottom-right-radius: 3px;subcontrol-origin: padding;subcontrol-position: top right; width:20px;}"
"QComboBox::down-arrow{image:url(:/FlightSimCaptain/Resources/down_arrow.png)}"
"QComboBox::down-arrow:hover{image:url(:/FlightSimCaptain/Resources/down_arrow_press.png)}"
"QComboBox::down-arrow:pressed{image:url(:/FlightSimCaptain/Resources/down_arrow_press.png)}");
cmBox->addItem("04");
cmBox->addItem("22");
QStyledItemDelegate *delegate = new QStyledItemDelegate(this);
cmBox->setItemDelegate(delegate);
版权归属:
三味线
许可协议:
本文使用《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》协议授权
评论区