FR 3040 then QR 3642 at Barcelona
Prague → Barcelona → Hamburg
Timetable, Barcelona time
21:15FR 3040 from Prague at the gate
17:45QR 3642 to Hamburg leaves the gate
20 h 30 apart on the timetable, overnight
QR 3642 leaves 20 h 30 after FR 3040 arrives on the timetable: more than half a day, so not a connection we count.