-
Notifications
You must be signed in to change notification settings - Fork 76
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
Transient Bindings break existing bindings #7
Comments
Interesting conf about binding : https://www.youtube.com/watch?v=G6W6MSzM7rs |
Sorry about the late response. I didn't receive a notification for this, or see it in my home page. Before going into the details, I want to say that I wrote these a while ago, and with the recent changes to QML some of them do not really apply any more. My knowledge also increased, so I wouldn't even recommend some (albeit very few) of them any more. I've been meaning to do a review of it and update the information to be up-to-date but I have been very busy recently. That being said, this may be a behaviour change in the recent versions or a bug. You can find some interesting things on Qt's Jira, particularly the bug that's highlighted once you click on the link. The documentation for the
It doesn't mention anything about the destruction of the binding object. I would expect a binding to be restored when the onClicked: {
console.log("buggon1 cliecked");
let temp = cmpBinding.createObject(rect, {
"when": true,
"target": rect,
"property": "flag1",
"value": true,
});
temp.Component.onDestruction.connect(function() {
console.log("destroyed");
});
temp.when = false
temp.destroy();
console.log("end of clicked");
timer.start();
} Even when the Let me know If you are willing to create a bug report for it, otherwise I'll do it referencing this issue. @davemilter |
Thanks for your work.
But in reality the "transient binding" described here https://github.com/Furkanzmc/QML-Coding-Guide#transient-bindings
looks like broke existing binding.
In code bellow expect that after destroying
temp
the previous bindingcfg_flag1 -> flag1
will work,but actually it doesn't work right after "transient binding" creation it stops work.
I tried with Qt 5.15.1
The text was updated successfully, but these errors were encountered: