Hi,

i have a design problem concerning the model/view architecture in qt 5 and i could really need some help.

Let's say i want to build an application that is capable of managing media (a media library) that can be lend. I have at least two (or more) different types of Media e.g. Book, Movie-DVD, Music-CD etc...
Therefore if have the following Classes:

- Medium (Base class with some basic member variables that all media shares)

- Book
- DVD
- CD

- User (A Person that can rent the media and give it back)


I want to be able to display all Media in a plain TableView with only the data that all media has in common, e.g. Author and Title. (for example to show which media was rent by a user)
I want to be able to display a single special Type of media, e.g. DVD in a plain TableView with all it's properties derived from the media class and the additional properies from the DVD class.

Now my problem is: How do i design the model to only use a single data source but serve the data this way to a TableView.

I already got the tip to use a TreeModel for storing the data in a tree and a QSortFilterProxyModel to filter the special types for the corresponding TableViews. But how do i tie everyting together? Is this approach the right one or is there a solution that suits the problem better?

Thanks in advance for your help.

greez trixn