Skip to content

Implementation of Behavior on #166

@tim37021

Description

@tim37021

Currently the implementation of Behavior is written as special case in generator code.

Behavior on {
}

However, this make it impossible to implement component like(Binding on x) in qml, instead I should

Binding {
  target: parent;
  property: "x";
  when: btn.pressed;
  value: 100;
}

It would be handy to add syntax sugar. When XX on x {} syntax, it dynamically bind parent to target and x to property and those two cannot be changed.

This is only my opinion, I still has ways to workaround though.

by the way, what do you think "supporting multiple properties at once"

Behavior on x,y,z {
  Animation { duration: 1000; }
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions