QComboBox *comboBox = new QComboBox(this);
comboBox->addItems(QStringList() << "item1" << "item2");
ui->treeWidget->setItemWidget(item, 1, comboBox);
I have used the method like the above code to add the comboBox to some itemWidget in a QtreeWidget. The appearance is not very good when the comboBox always shows.
Is there a method to hide the comboBox and it would appear again when I click that cell? Please give me some help. Thanks.