I have a QTreeWidget where I'm creating custom editing delegates for some rows in the tree that are based on field specific comboboxs. This part works fine.

My problem is when I go to assign the editor for the row. The code I'm using is -
Qt Code:
  1. _rowCount++;
  2. _workingTreeWidget->setItemDelegateForRow(_rowCount, comboEdit);
To copy to clipboard, switch view to plain text mode 

Where _rowCount is the running row counter for the rows inserted into the tree structure from the start and comboEdit is the custom editor for this row only. My problem is that this is not working correctly. What I need to know is how to retrieve the correct row number that I've inserted the QTreeWidgetItem into, so that I can set the correct delegate for it.