N
N
nikita_chiru2019-11-25 14:26:55
QML
nikita_chiru, 2019-11-25 14:26:55

How to use signals and slots only in qml between parent and child?

How to use signals and slots only in qml between parent and child?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TriKrista, 2019-11-25
@nikita_chiru

something like this:

// Child.qml
Item {
    id: rootItem
    signal sendMessage(string msg)
//...
    rootItem.sendMessage("bla bla bla")
//...
}

// Parent.qml
Item {
    Child {
        onSendMessage: {
        // используем переменную msg для наших целей.
        }
    }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question