QComboBox列表项高度设置步骤:

1. 设置代理

QStyledItemDelegate *delegate = new QStyledItemDelegate(this);
ui->comboBox->setItemDelegate(delegate);

2. 设置风格

ui->comboBox->setStyleSheet("QComboBox QAbstractItemView::item {min-height: 30px;}");
---------------------
作者:咖啡色的思想者
来源:CSDN
原文:https://blog.csdn.net/xiaogangwang2012/article/details/51192419

相关文章:

  • 2021-05-24
  • 2022-01-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-06
  • 2022-01-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-03
  • 2021-04-23
相关资源
相似解决方案