Class QAbstractItemModel have a method QAbstractItemModel::createIndex() that creates QModelIndex.
When this object created for each QComboBox item for example?
In documentation we can find:
Note: Model indexes should be used immediately and then discarded. You should not rely on indexes to remain valid after calling model functions that change the structure of the model or delete items. If you need to keep a model index over time use a QPersistentModelIndex.
So it seems temp object, but who create it? Is it model, but i did not find any sign that model itself create index in source code, or it View (Widget) creates index before it reads data from model?
How QComboBox store values and indexes that readed from Model, or it reads it from every time it need to update data?
How QComboBox actually read data, is it just loop through from 0 to rowCount() and creates new index for each value then use data( const QModelIndex &index, int role ) to read?