Hi,
thanks for taking the time to check this. I found the issue.
What I forgot to mention (and that was key for the issue) is that the above code which uses the selectionIterator is called from a slot called by 'focusRowChanged(int,int)' signal.
Probably not the best way to find the model Row index, but it worked up until 3.1. Starting 3.2, the focusRowChanged signal is fired before the selectionIterator is updated with the newly focussed row.
I changed the code to use the newRowIdx passed through the focusRowChanged SIGNAL to fetch the modelRowIndex through the modelController->getGridRow()->modelRowIndex() function. This looks more consistent and less prone to timings between focus and selection.
Code now looks like:
...
QObject::connect(view,SIGNAL(focusRowChanged(int,int)),this,SLOT(showdetail(int,int)));
...
void TransactionsDialog::showdetail(int oRowIdx, int nRowIdx) {
...
int modelRowIndex = view->modelController()->getGridRow(nRowIdx)->modelRowIndex();
...
}
Can you confirm this is the best way to get access to the index within the model when inside the focusRowChanged event handler ?
After more than 2 years using the datagrid, I'm still struggling to find the correct way to achieve something. There is a lot of functionality and very much to discover I'm sure, but not enough time to experiment. That is why a good forum would be great for everyone using the grid.
Thanks for the good work on the grid, I like what you have done with the 3.x release !
Pascal.