Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Properties and signals



  • hello , i have a question in signal, slot communication in QML.

    in one class we have a property

    // First.qml

    Rectangle
    {

    }
    
    //Second.qml
    First
    {
    ``onCountChanged:
            { 
            }
    }
    
    having user defined signal handler using property,
    making use of property, can we have signal handler?.
    
    
    
    using signals
    2)
    // First.qml
    
    Rectangle
    {
    signal handleClick
    MouseArea
    {
    ``
    ``
    handleClick()
    }
    }
    
    // Second.qml
    
    First
    {
    
    onHandleClick:
           {
                               // implementation part
          }
    }
    
    
    is my question relevant, can u give better example for understanding, it would help me.

  • Moderators

    Every signal has a corresponding signal handler by deafult in QML.
    What is your second question ?


Log in to reply