compiled successfully.but still the same error comes .
I guess you mean the segmentation fault.

Your code has the following problems:
Qt Code:
  1. QextSerialPort *note= new QextSerialPort("/dev/ttyS0");
To copy to clipboard, switch view to plain text mode 
You are allocating the serial port on to a local pointer.
You will not be able to access the serial port outside the constructor.
'note' needs to be a member variable.

Where is the code that handels the reading/writing to the serial port?