Commit 331e925e authored by EXT Arnaud Clère's avatar EXT Arnaud Clère

Update README.md

parent 9e69b747
......@@ -310,7 +310,10 @@ Last but not least, one can customize the bind operation to suit specific needs
First, Providing in advance some `meta` data allows binding deep C++ data structures in custom ways for use with multi-dimensional Q...View classes:
```cpp
QStandardItemModel matrix, flat, tree, table;
QModelWriter<>(&matrix).meta(qmSizes ,"4,3" ).bind(transform);
QModelWriter<>(&matrix).meta(qmSizes ,"4,3" ).bind(QVector<double>{1./3, 2./3, 1./3, 1.,
2./3, 1./3, 2./3, 1.,
1./3, 2./3, 1./3, 1.,
0. , 0. , 0. , 1.});
QModelWriter<>(& flat).sequence() .with(persons, flatten); // recursive bind function
QModelWriter<>(& tree).meta(qmChildren,"children" ).bind(persons);
QModelWriter<>(& table).meta(qmColumns ,"names,age").bind(persons);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment