You are not duplicating data.
This way you do duplicate data :-) Just fetch the data into the model in your delegate's constructor and then set the model on a combo box in createEditor or in setEditorData using QComboBox::setModel().And then I can fill the combo box with data after I create it...
This way the class is re-useableQt Code:
ComboBoxDelegate *delegate = new ComboBoxDelegate(this); delegate->addItem(string, int); delegate->setEditColumn(int);To copy to clipboard, switch view to plain text mode![]()






Reply With Quote
Bookmarks