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

Connection between two Pages in SwipeView



  • main.qml
    ApplicationWindow {
    visible: true

    SwipeView {
        id: swipeViewId
        currentIndex: 0
    
        SettingsForm {
            onLoopFinished:
                ResultForm.createList()
        }
    
        ResultForm {
        }
    
    }
    

    SettingsForm.qml

    Page {
    id: settingsId
    padding: 10

    signal loopFinished
    

    }

    ResultForm.qml
    Page {
    id: listId

    function createList()
    {
    console.log("ResultForm")
    }

    My question is. How can I define a connection between Settingsform.qml and ResultForm.qml with signal loopFinished and slot createList in main.qml
    I've got Error
    qrc:/main.qml:21: TypeError: Property 'createList' of object [object Object] is not a function


  • Moderators

    @Egon-Schaal

    SettingsForm {
            onLoopFinished:
                resultFormId.createList()
        }
    
        ResultForm {
     id: resultFormId
        }
    


  • Thanks that works


Log in to reply