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