FR 5898 then QS 1057 at Madrid
Torino → Madrid → Prague
Timetable, Madrid time
15:10FR 5898 from Torino at the gate
13:55QS 1057 to Prague leaves the gate
22 h 45 apart on the timetable, overnight
QS 1057 leaves 22 h 45 after FR 5898 arrives on the timetable: more than half a day, so not a connection we count.