I want to create an signal so I have an qml file with name TestCreateSignal.qml with content like this:
import QtQuick 2.0
Rectangle
{
color: "red"
width: 344
height: 233
signal sendMessage
MouseArea
{
onClicked:
{
sendMessage();
}
}
}
and i want to use this signal in another qml file with name TestUseSignal.qml
import QtQuick 2.0
Rectangle
{
TestCreateSignal
{
sendMessage: //Error is at this line
{
console.log("message sendded");
}
}
}
but i got error like this when i want to user that
qrc:/TestUseSignal.qml:5 Cannot assign to non-existent property "sendMessage"