Hi, I have a serial connection that I put each coming data into a QByteArray:


Qt Code:
  1. connect(&SerialPort, SIGNAL(readyRead()), this, SLOT(slot_reading()));
To copy to clipboard, switch view to plain text mode 


Qt Code:
  1. //the slot:
  2. void Cserial::slot_reading()
  3. {
  4. QByteArray DataReading = SerialPort.readAll();
  5. }
To copy to clipboard, switch view to plain text mode 

I need to save all coming data into a file. So i must gather each QByteArray::DataReading and at the end, saving all of them into a file (by pushing a QPushButtom in name of "save").
1-How could I gather all data?
and then
2-how can I save into a file?

Thanks a lot for any help