知道索引,就用 setCurrentIndex(index) 接口。
知道文本,就用 setCurrentText("text") 接口。
一般用 index 较多,因为 text 有可能会重复。

1 comboBox->setCurrentIndex(0);
2 comboBox->setCurrentText("xxx");

 

相关文章:

  • 2021-09-02
  • 2022-12-23
  • 2021-06-15
  • 2021-06-06
  • 2022-02-13
  • 2021-05-07
  • 2021-11-21
  • 2021-10-05
猜你喜欢
  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
  • 2021-06-06
  • 2021-11-24
  • 2021-06-22
  • 2022-12-23
相关资源
相似解决方案