1.首先给ComboBox设置view:

ui->comboBox->setView(new QListView());

2.给comboBox设置样式,可以在creater里设置,也可以调用接口 设置:

QComboBox QAbstractItemView::item { min-height: 40px;}

QComboBox设置下拉item大小

 

设置过之后运行看下效果:

这里只是设置了 高度40:

QComboBox设置下拉item大小

相关文章: