I did an implementation with two proxies, but it was really ugly.
- I had to analyse the content of the nodes for the differnt views (specially requirement).
- You can't create an index for the source model (you must store it, which results in a lot of duplicated QModelIndexes, or you have to implement a workaround, to be able to set the model pointer correct in the index). for a huge amout of data not really nice.
- The nodes knows the header and with proxies you have to set the headers far away from the nodes.
Returning a lot of different columns in one model (all available columns for all nodes) and then filtering out what's necessary is painful.
suppose (a concrete example - the real application is much more painful):
room
..+device
....+-chip
......+-pin
where the headers are
room: floor, size, costs, ............
device: supplier, pin-count, supply-voltage, .......
pin: mode, trigger-voltage, period, ...........
...
...
...
it's different from file browser or something else, where you show more or less the
same data for each node. one model with one header.
best regards,
bernd




Reply With Quote



Bookmarks