diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-12-18 23:48:11 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-02-22 17:32:10 +0000 |
commit | b15654d77f7886ae23f06d760b90973983e12779 (patch) | |
tree | 8e21d6e4022c77e41180190ccd66c37b57db4cf1 /.qmake.conf | |
parent | 22435f49499342ff102411c025efb8007dfa62a2 (diff) |
TableModel: add QML-invokable overloads for index(), data() and setData()
data() needs to be invokable because it does more processing to ensure that
DisplayRole will give us something, and we want to be able to access it in
JS code too, not only via the role context property in a delegate binding.
index() needs to be invokable to use it when calling data(). It's useful
for setData() to be invokable so that TableView delegates can be used to
edit the model. However since we don't normally expose numeric roles to
QML, we use string roles, and have to look them up in the roleNames() hash.
Change-Id: I38904ac995fc2bac514bde2dd37a95e0b911c00c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to '.qmake.conf')
0 files changed, 0 insertions, 0 deletions