Hi,
I want to send a signal with an array argument from QML to CPP. I did it using 1 dimensional array.
my sample code is
Rectangle {
width: 400
height: 400
color: "#d5b9b9"
id:rect
property variant signalStrings: []
signal handledSignal(variant array)
}
Rectangle {
width: 400
height: 400
color: "#d5b9b9"
id:rect
property variant signalStrings: []
signal handledSignal(variant array)
}
To copy to clipboard, switch view to plain text mode
var temp = rect.signalStrings
temp[temp.length] = "onSignal_object1"
temp[temp.length] = "onSignal_object2"
temp[temp.length] = "onSignal_object3"
temp[temp.length] = "onSignal_object4"
rect.signalStrings = temp
rect.handledSignal(signalStrings)
var temp = rect.signalStrings
temp[temp.length] = "onSignal_object1"
temp[temp.length] = "onSignal_object2"
temp[temp.length] = "onSignal_object3"
temp[temp.length] = "onSignal_object4"
rect.signalStrings = temp
rect.handledSignal(signalStrings)
To copy to clipboard, switch view to plain text mode
Now I want to send a two dimensional array. How can I do it?
Thanks in advance....
Bookmarks