aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2018-12-19 01:42:11 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2019-02-15 14:17:21 +0000
commit27c0e9d709aba97bd522fd3e53a53c4ff3c4d71b (patch)
tree51454573dc37dd44463bf0013bacdee608daa956 /tests/manual
parent8a62975ecb554f4c3f131aeaf73858e529398cae (diff)
TableModel: add roleDataProvider callback
As an alternative to trying to write smarter C++ in the data() accessor, we give the user full control of data conversion by calling an external JS function if defined, to map role to the value that data() should return. This enables extracting arbitrary values, converting the data in arbitrary ways, or even doing calculations in case the EditRole stores a formula and the DisplayRole should provide the result, or something like that. This callback is implemented somewhat like TableView.columnWidthProvider, but the arguments are more complex: function(row, column, role, rawData) Change-Id: Ifaf5807f4809e0b5ad1d1c403f65c0707b902f10 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/manual')
0 files changed, 0 insertions, 0 deletions