Convert QList iterator to index
You can subtract iterator to beginning of your list from your iterator to get an index, since pointer arithmetic is defined on iterators:
int idx = iter-yourList.begin();
See QList-iterator-reference
As pointed out by @Frank Osterfeld's comment, you can use this:
const auto index = std::distance(yourList.begin(), currentIteratorOnYourList);
Checkout this article from Fluent{C++} blog.