abbd26f553
Data in item models is most often organized in rows, where each column contains an attribute of the item represented by the row. Often when sibling is used, it is to request another piece of data from the same row. Having a specialized version makes this easier and less awkward to do, simplifying auto sibling = index.sibling(index.row(), columnOfInterest); to auto sibling = index.siblingAtColumn(columnOfInterest); For symmetry reasons, siblingAtRow(rowOfInterest) was also added. Change-Id: Ib203b2cdb16154cbb2680d16fb5c6a7538f33d07 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: David Faure <david.faure@kdab.com> |
||
---|---|---|
.. | ||
.gitignore | ||
modelstotest.cpp | ||
qitemmodel.pro | ||
README | ||
tst_qitemmodel.cpp |
This is a QStandardItemModel test. It will help catch a lot of simple problems. You should still create your own test for custom functionality and functions that your model has. Add your model to the modelstotest.cpp file (qt model's are included as examples) and modify the pro file accordingly. Fix the errors in order of failure as later tests assume the ones before them have passed.