i can see your house from here
DESCRIPTION
Joint presentation with Till Adam and Marius Bugge Monsen. The model/view framework is one of the most powerful areas of Qt4, but also one of the most complex. It is elegant in its design, but proves to be difficult to master for many who try in practice. While a lot of effort went into anticipating how developers would use and potentially mis-use this API, real world usage patterns, best practices and common errors turn out to be interestingly deviant. Marius, who was part of the original architecture team behind these classes, and Till, who has taught the concepts to varied audiences and seen a wide range of real world applications of them both in his work on KDEPIM and as a consultant at KDAB, combine their experiences in this presentation to provide a unique joint perspective.TRANSCRIPT
![Page 1: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/1.jpg)
I can see your house from here
Part 1
![Page 2: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/2.jpg)
![Page 3: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/3.jpg)
7.5 Years
![Page 4: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/4.jpg)
79 Files
![Page 5: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/5.jpg)
32957 Lines Of Code
![Page 6: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/6.jpg)
The Beginning
![Page 7: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/7.jpg)
AuthorClient
DateDescription
Jobs fixed
reggiereggie-piefke2002/12/03 14:43:32nothing yet-
![Page 8: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/8.jpg)
espenrespenr-deimos2002/12/04 19:30:30Added a FileTableModel and changed main to test it.Reads the columns in the astronomy_large.txt backwardsand will reread the file if you edit it. (Just touch it)-
AuthorClient
DateDescription
Jobs fixed
![Page 9: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/9.jpg)
mmonsenmmonsen-elysium2002/12/05 15:37:13QItemModel subclass that implements a directory tree as a data source.-
AuthorClient
DateDescription
Jobs fixed
![Page 10: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/10.jpg)
A Rush of Creativity
![Page 11: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/11.jpg)
2002/12/09
![Page 12: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/12.jpg)
2002/12/13
![Page 13: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/13.jpg)
2002/12/16
![Page 14: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/14.jpg)
2002/12/18
![Page 15: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/15.jpg)
2002/12/20
![Page 16: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/16.jpg)
2003/01/06
![Page 17: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/17.jpg)
2003/01/07
![Page 18: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/18.jpg)
2003/01/09
![Page 19: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/19.jpg)
2003/01/10
![Page 20: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/20.jpg)
2003/01/016
![Page 21: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/21.jpg)
2003/01/24
![Page 22: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/22.jpg)
2003/02/03Last commit by reggie.
![Page 23: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/23.jpg)
2003/03/04espenr releases Qt 3.1.2
![Page 24: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/24.jpg)
Decisions
![Page 25: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/25.jpg)
mmonsenmmonsen-elysium2003/10/23 16:49:51Add QObjectRepository. This is an object pool to avoid new/deletes.Use it on MemModelItems (for testing).-
AuthorClient
DateDescription
Jobs fixed
![Page 26: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/26.jpg)
mmonsenmmonsen-elysium2003/10/26 16:08:11Introduce the alt_ classes.They are the begining of the implementation of item views usingQModelIndex instead of QGenericModelItem.The model items are just too heavy.-
AuthorClient
DateDescription
Jobs fixed
![Page 27: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/27.jpg)
haraldharald-morpork2003/11/11 21:26:08Here we go - first implementation of a database model-
AuthorClient
DateDescription
Jobs fixed
![Page 28: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/28.jpg)
espenrespenr-phobos2004/01/21 11:49:57move new itemviews into qt4 (no they are not finished)-
AuthorClient
DateDescription
Jobs fixed
![Page 29: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/29.jpg)
espenrespenr-phobos2004/02/11 20:06:25changed QGenericItemModel to have roles (Display, Decoration, ToolTipetc) and removed the use of "elements" everywhere.<snipp>-
AuthorClient
DateDescription
Jobs fixed
![Page 30: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/30.jpg)
mmonsenmmonsen-elysium2004/02/25 17:06:16QGenericItemModel -> QAbstractItemModel.-
AuthorClient
DateDescription
Jobs fixed
![Page 31: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/31.jpg)
Complexity
![Page 32: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/32.jpg)
mmonsenmmonsen-elysium2004/05/04 18:22:39Add QPersistentModelIndex.-
AuthorClient
DateDescription
Jobs fixed
![Page 33: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/33.jpg)
rraggirraggi-rabagast2004/07/01 17:13:10Initial implementation of the new Property Editor-
AuthorClient
DateDescription
Jobs fixed
![Page 34: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/34.jpg)
2004/08/21 - 29Akademy 2004
![Page 35: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/35.jpg)
mmonsenmmonsen-onyx2004/08/26 22:17:16Add QProxyModel.The idea is that you can subclass this model and use it for filtering and sorting.-
AuthorClient
DateDescription
Jobs fixed
![Page 36: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/36.jpg)
mmonsenmmonsen-elysium2004/10/22 19:25:11Add a model pointer to QModelIndex.-
AuthorClient
DateDescription
Jobs fixed
![Page 37: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/37.jpg)
Towards the Goal
![Page 38: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/38.jpg)
espenrespenr-phobos2005/02/27 22:31:42branch 4.0 from main-
AuthorClient
DateDescription
Jobs fixed
![Page 39: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/39.jpg)
2005/06/28Qt 4.0 Released!!!
![Page 40: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/40.jpg)
Work Continues
![Page 41: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/41.jpg)
I can see your house from here
Part 2
![Page 42: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/42.jpg)
Marius, Espen, I want your baby
Disclaimer:
![Page 43: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/43.jpg)
the five stages of grief
![Page 44: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/44.jpg)
Denial
![Page 45: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/45.jpg)
Anger
![Page 46: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/46.jpg)
Bargaining
![Page 47: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/47.jpg)
The Mutz Axiom
“the solution to every engineering problem is QProxyModel”
![Page 48: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/48.jpg)
View
Stuff
Model
political correctness proxy
sorting proxy
![Page 49: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/49.jpg)
View
Stuff
Model
sorting proxy
political correctness proxyStuff
![Page 50: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/50.jpg)
Depression
![Page 51: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/51.jpg)
- excessive minimalism
- missing error handling guidance
- hard to make transactional
- hard to implement undo
- tree complexity imposed on the table case
![Page 52: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/52.jpg)
- treacherously public internalId/internalPointer
- unfortunately named QStandardItemModel
- "thou shall not work on foreign indexes" not
enforced (NVI?)
- MVC, but not really
![Page 53: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/53.jpg)
Acceptance
![Page 54: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/54.jpg)
QAbstractItemView
QAbstractItemModel
political correctness proxy
sorting proxy
Controller ModelStuff
View
![Page 55: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/55.jpg)
[email protected]@kdab.com
![Page 56: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/56.jpg)
![Page 57: I can see your house from here](https://reader033.vdocument.in/reader033/viewer/2022052523/555ad91dd8b42a024a8b4e1d/html5/thumbnails/57.jpg)
Image Credits:
Stuck in Customs on flickrMichelle Smorgon on flickr