[Qt-qml] QML/C++ shared QItemSelectionModel
Carl Snellman
carl.snellman at gmail.com
Tue Sep 14 00:29:56 CEST 2010
Hey,
I have one common QAbstractItemModel that serves data for a ListView
in QML side and for another QGraphicsWidget (a map that shows items).
They use the same data model nicely, but as my goal is to keep the
selection in sync in both views, so I'm trying to get them to share
the selection model, too. My problem is that I cannot find a way to
get those two views to share the same selection model
(QItemSelectionModel, acquired with map.selectionModel()). Would
anyone have any suggestions/snippets how to hook my own
QItemSelectionModel to QML's ListView?
Any help is greatly appreciated!
Carl
More information about the Qt-qml
mailing list