QStandardItem + QComboBox
问题 I am trying to put a QComboBox into a QStandardItem to be used in a QStandardItemModel . I have been looking around and I cannot find an answer, any ideas? 回答1: You don't store a QComboBox in a QStandardItemModel . Let's say you have the following choices: A B C D and you have a list with two items in a QListView , the first value being A the second being D: QListView* pView = new QListView(); QStandardItemModel* pModel = new QStandardItemModel(); pView->setModel(pModel); pModel->appendRow