component = Qt.createComponent("Button.qml");
                  
                  
                  if (component.status == Component.Ready) {
                  
                  
                      component.createObject(parent, {"x": 100, "y": 100});
                  
                  
                      component.onClicked = console.log("hi")
                  
                  
                  }
                  
                  
                  It works perfect except last line. when component ready it automatically invode onClicked signal. but i want to activate it when user click on it. How to fix it?
                  
                  
                
last line should be a function
is this js?
Обсуждают сегодня