If you want to connect for particular signal, first define the function in QML and use Connections object or <id>.signalName.connect(..) to connect with particular handler.
@Wuzi said:
QStrings do not use \0 as end of string marker , as far as i know
but will put one there when converted to std string etc.
QbyteArray can also include the \0
please see
http://doc.qt.io/qt-5/qbytearray.html#data