Skip to content

Add KRoleNamesModel to expose roleNames mapping to QML

ivan tkachenko requested to merge work/ratijas/modelrolenames into master

This new helper class exposes roleNames of another model in two ways:

  • as a model itself (with "role" and "roleName" roles) in a random but stable manner,
  • and as two Q_INVOKABLE functions to map both ways on demand.

Ideally there should be a third approach with a map-like property that notifies on reset, and which could be used in declarative bindings.

image

Merge request reports