QR 3676 then FR 5315 at Madrid
Firenze → Madrid → Rome
Timetable, Madrid time
14:00QR 3676 from Firenze at the gate
06:55FR 5315 to Rome leaves the gate
16 h 55 apart on the timetable, overnight
FR 5315 leaves 16 h 55 after QR 3676 arrives on the timetable: more than half a day, so not a connection we count.