There is a qml file with the code for a button.
I wish to define a slot to that signal in another qml file.
How should I go about this?
Added after 5 minutes:
SOLVED:
ButtonA.qml is the file containing signal.
I wrote the slot in other file like:
Qt Code:
import QtQuick 2.0 Item { ButtonA { Component.onCompleted: { send.connect (functionNameA); send ("What?") } function functionNameA (notice) { console.log ("Sending notice: " + notice) } onSend: { console.log ("send signal emitted with notice: " + notice) } } }To copy to clipboard, switch view to plain text mode
Bookmarks