Thank you,
I have this code in "MySerialPort" class:
Qt Code:
  1. void MySerialPort::readData()
  2. {
  3. QByteArray data = serial->readAll();
  4. if(data[0]=='0') // For example
  5. Show qml dialog
  6. if(data[1]=='1') // For example
  7. disable GroupBox
  8.  
  9. ...
  10. ...
  11. }
To copy to clipboard, switch view to plain text mode 

How can I handled this code on the QML side?