Hi, I have a serial connection that I put each coming data into a QByteArray:
connect(&SerialPort, SIGNAL(readyRead()), this, SLOT(slot_reading()));
connect(&SerialPort, SIGNAL(readyRead()), this, SLOT(slot_reading()));
To copy to clipboard, switch view to plain text mode
//the slot:
void Cserial::slot_reading()
{
}
//the slot:
void Cserial::slot_reading()
{
QByteArray DataReading = SerialPort.readAll();
}
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
Bookmarks