FR 573 then QR 6549 at Madrid
Porto → Madrid → Ranon
Timetable, Madrid time
22:05FR 573 from Porto at the gate
19:45QR 6549 to Ranon leaves the gate
21 h 40 apart on the timetable, overnight
QR 6549 leaves 21 h 40 after FR 573 arrives on the timetable: more than half a day, so not a connection we count.