[Interest] Two item models.

william.crocker at analog.com william.crocker at analog.com
Thu Mar 24 01:24:57 CET 2016


Hello:

If I have a single data structure being presented to the world
by two, separate item models and I want to "insert a row".

I assume I would:
1 - call beginInsertRows on both models,
2 - insert the row in my single data structure
3 - call endInsertRows on both models.

I am pretty sure I am doing it correctly, but the ModelTest class
does not seem to like that.

     Q_ASSERT(c.oldSize + (end - start + 1) == model->rowCount(parent));

Yes, I know, I should have a single model and use QIdentityProxyModel
for my alternate view. Pretend the question is academic. :-)

Thanks.

Bill

----------------------------------------
BTW: ModelTest is a life saver.
      Even if you think you know what you are doing.



More information about the Interest mailing list