Hello,
I have a 5 column Model inherited by "QAbstractTableModel" because of QTableView as View. The last two columns contains combo boxes which are populated through their delegates inherited by "QStyledItemDelegate". Everything is working fine independently.
Next Task:
Column 4 contains some mode which is related to column 5 in terms of respective functions,(refer the below figure) e.g. if I select some item in the (col-4) combo box, it will change/create the col-5 combo box according to the provided functions from Model. Which means every time when I receive the signal of datachange in column 4, it has to call the createWidget function from the delegate class in order to create a new combo box and its items. I tried some ways to call createWidget manually when I have received the datachange but as the Model is running with specific index.col I can not change the data of column 5 while changing settings in column 4.
ComboBox.jpg
above figure shows the example what i want to do , Like if I select the Decrement mode it will fetch the data(done) and create a new combo box or update the data of the combo box in column 5. I have tried many logic and algo to change things from setEditorData & setModelData though the only problem is that index is at column 4 so couldn't even do the qobject_cast.
Please share your experience in this regard or maybe I am doing something wrong.
Bookmarks