Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Main.qml
- PageStackWindow {
- id: rootWindow
- property int checkVar: 0
- function fn1() {
- checkVar = 2;
- checkVar = 1;
- checkVar = 0;
- }
- CustomComp {
- id: c1
- }
- onCheckVarChanged: {
- console.log("cvar changed in root window "+checkVar); // here it prints only 3 times
- // which is correct
- }
- }
- CustomComp.qml
- Item{
- Connections{
- target: rootWindow
- onCheckVarChanged:{
- console.log("cvar changed in root window printed in custom component : "+checkVar);
- // here it prints twice for each change ie., 6 times.. why?
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement