On Wed, 18 Jul 2012 15:53:54 Tony Rietwyk wrote: > > Sent: Wednesday, 18 July 2012 2:28 PM > > > > Hi, > > > > I am writing an app in which I am wanting to display my data in a > > number > > of > > > different ways. (Currently QT4.8 on linux, but will also run it on > > windows, if > > > this is relevant!) > > > > As an example what I have is a set of tuples with two field, say Name > > and > > Hours > > > > I have this working with table view and am able to access and edit the > > data. > > > What I want is a not editable view of the data which shows the total of > > all the > > > Hours for each Name. --snip-- > > With thanks, > > Hugh > > Hi, > > I think QAbstractProxyModel only applies when there IS a direct mapping > between the elements of each model, that maintains their identity. > > You need a model with an element for each group (or grouping level), that > listens for the changes in the source model and adjusts the group's summary, > then signals the change for that one group. > > The QML VisualDataModel component looks like it has grouping capabilities. > Maybe you can get some ideas from its implementation? > > Hope that helps, > > Tony. > Hi, Thanks for the response. I have not developed great QML skills yet so nothing is jumping out at me, but will continue to investigate this. I am thinking I will extend my data class to be an aggregation holding multiple QAbstractProxyModels and handle the different changes there.
Hugh _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest