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