W6 2377 then QR 3627 at Barcelona
Budapest → Barcelona → Rome
Timetable, Barcelona time
20:05W6 2377 from Budapest at the gate
14:45QR 3627 to Rome leaves the gate
18 h 40 apart on the timetable, overnight
QR 3627 leaves 18 h 40 after W6 2377 arrives on the timetable: more than half a day, so not a connection we count.