-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of Behavior on #166
Comments
this is really good suggestions, thank you! |
my pleasure, actually I am pretty glad when I found this project is very active. |
Many people use it on daily basis, even though there's not much activity here |
Behavior on [property list] is perfectly fine now, consider the following example: Item {
anchors.fill: context;
Rectangle {
id: r1;
border.width: 1;
border.color: "black";
color: "#0000";
width: 10;
height: 10;
}
Rectangle {
id: r2;
border.width: 1;
border.color: "black";
color: "#0000";
width: 10;
height: 10;
}
Timer {
running: true;
repeat: true;
interval: 1000;
onTriggered: {
r1.x = r1.x !== 100? 100: 0;
r2.y = r2.y !== 100? 100: 0;
}
}
Behavior on r1.x, r2.y {
Animation { duration: 200; }
}
} |
context.onWidthChanged fixed in cca410b |
accidentally closed wrong one, sorry :) |
I think that generalising |
consider the following example:
All original properties are supported, including path in property, e.g. 'effects.invert' |
BIG thanks for officially implementing this. |
@tim37021 np, it was not hard at all :) |
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
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"
The text was updated successfully, but these errors were encountered: