Unsolved Proxy Models
-
Hello,
I've one genreral question regarding view-proxymodel-model desgin within qt.
My sourceModel tracks e.g. 10 different measurement values. It should be the source model of a proxymodel connected to
a GridView. The displayed measurement values can be configured by the GUI.Now it should be possible to display 10 times the same measurement value or 10 different mesaurement values.
My proxymodel has to map the GridView index via mapToSource to an valid source model index. I think that this works already.
But how do i map a source Index to multiple proxyIndexes? This is allways the case when I configuring the GUI to display the same measurement value multiple times. Studying the interface of mapFromSource only one QModelIndex is returned.
So the general problem can be formulated as:
Is it possible to implement 1:n and n:1 index mapping from source to proxy and vice versa? -
@approx said in Proxy Models:
Is it possible to implement 1:n and n:1 index mapping from source to proxy and vice versa?
short answer: not out of the box and even a manual solution seems quite challenging
details: https://forum.qt.io/topic/71784/simplest-way-to-write-m-to-n-eg-aggregating-proxy-models -
Many thanks for answering.