FR 3040 then QR 3516 at Barcelona
Prague → Barcelona → Málaga
Timetable, Barcelona time
21:15FR 3040 from Prague at the gate
19:45QR 3516 to Málaga leaves the gate
22 h 30 apart on the timetable, overnight
QR 3516 leaves 22 h 30 after FR 3040 arrives on the timetable: more than half a day, so not a connection we count.