QComboBox ListView 正在占用组合框框架

QComboBox ListView is occuping combobox frame

组合框包含两个条目,当单击组合框时,列表视图占据组合框的框架。我想要组合框下方的列表视图。样式表如下:

QComboBox {
border: 1px solid #8F9EAB;
border-radius: 3px;
font: 16pt "Arial";
min-width: 6em;
color: #1B3067;
background-color: rgb(255, 255, 255);
padding-left:10px;
} 
QComboBox:pressed
{
border: 1px solid #1562AD; 
color: rgb(255, 255, 255);
background-color: #87A6D5;
} 
QComboBox:disabled
{
border: 1px solid #BFBFBF; 
color: #BFBFBF;
background-color: rgb(255, 255, 255);
} 
QComboBox::down-arrow
{ 
background-image: url(:/Images/data/img/Images/DOWN_enabled.png);
height: 7px;
width : 13px;
}
QComboBox::drop-down 
{ 
subcontrol-position: top right;
width: 40px;
color: white;
border-left-width: 0px;
border-left-color: #8F9EAB;
border-left-style: solid; 
border-top-right-radius: 3px;
border-bottom-right-radius: 3px; 
}
QComboBox QListView
{
font: 16pt "Arial";
color: rgb(80, 80, 80);
}
QComboBox QAbstractItemView::item 
{
border-bottom: 5px solid white; margin:3px;
}

view()的位置无法用Qt Style处理Sheet,必须创建一个继承自QComboBox的class并覆盖showPopup()方法如下图

class ComboBox: public QComboBox{
public:
    using QComboBox::QComboBox;
public:
    void showPopup(){
        QComboBox::showPopup();
        QPoint pos = mapToGlobal(QPoint(0, height()));
        view()->parentWidget()->move(pos);
    }
};