W6 2377 then QR 3619 at Barcelona
Budapest → Barcelona → Bari
Timetable, Barcelona time
20:05W6 2377 from Budapest at the gate
18:15QR 3619 to Bari leaves the gate
22 h 10 apart on the timetable, overnight
QR 3619 leaves 22 h 10 after W6 2377 arrives on the timetable: more than half a day, so not a connection we count.