28 minutes of video presentation
http://developer.qt.nokia.com/elearning/watch/the_next_generation_qt_item_views
For those who followed some of my tutorials in PyQt should know that Qt utilizes an abstract model interface to act as an adaptor between the data and the view. There is no controller. The Model-View framework in Qt is a simplified, modified version of the actual Model-View-Controller pattern
But watching that video, Qt gets some more love in this area
So instead of using QAbstractItemModel and QAbstractItemView ( appliable to List, Table, Tree)
they introduce dedicated interfaces for each separate data storage model, and also a Controller so itβs MVC now
For list:
QListModelInterface (Data and logc)
QGraphicsListView (Presentation, GraphicsView is hardware accelerated)
QListController (Behaviour and input)
QListSelectionManager (Selection state)
And if you would want to use the old QListWidget (no model view based), the new way would be using this:
QListWidgetNG (next generation) that has an instance of controller, where the controller has instance of view and model behind the scenes
All the items are QGraphicsViews aswell, so you can have ITEMS which are themselves QGraphicsListViews
Animations are alot easier to handle etc
Since the controller is responsible for input and then doing something on the View and the Model, this allows stuff such as QKineticListController provided, where scrolling and dragging is kind of velocity preserving when you release the inputs. So you can now controll your applicaiton even more by subclassing Controllers.
Qt is also getting optimized as hell, right now a view loads all the model data into memory instead of asking for the 10 items your view can show⦠this is being looked at and optimized away So it will not load 10 000 data from the list model etc
They also have an Adaptor interface now that allows you to convert a tree models output data into a list, so a listview can view tree model data if desired.
So many reasons to love Qt outside of UI programming
Check out the sidebar on that developer network link for more juicy stuff
Best regards!