I added a delay function before reading the serial port,

console->SenDelay(70); QByteArray data = serial->readAll();

now everything is working.