Hi,
I have a problem reading data from a file and presenting it in a QtableView, the sequence of the data row is reversed. I am using the insertRow (int position, int rows, const QModelIndex & index) function of the AddressBook example in the QtableModel, that is, beginInsertRows (QModelIndex (), position, position + rows - 1); .... endInsertRows (). When calling the function insertRow () I put
int rowPosition = 0;
tableModel-> insertRows (rowPosition, 1, QModelIndex ());
rowPosition ++; // Number of rows I have added
but the rows are presented in an inverted order as in the figures.
How do I present the rows in the proper order?
thanks for help me.
Bookmarks