QComboBox怎么设置提示信息
当点开下拉链表后,鼠标悬停在链表的某一项时,设置提示信息
请问怎么实现?
[解决办法]
void MainWindow::initCOmboBox(){ QListView *view = new QListView(this); QStandardItemModel *model = new QStandardItemModel(this); QStandardItem *item; item = new QStandardItem("First Item"); item->setToolTip("This is the first item"); model->appendRow(item); item = new QStandardItem("Second Item"); item->setToolTip("This is the second item"); model->appendRow(item); ui->comboBox->setView(view); ui->comboBox->setModel(model);}