LA 5741 then QR 3642 at Barcelona
Lisbon → Barcelona → Hamburg
Timetable, Barcelona time
23:55LA 5741 from Lisbon at the gate
17:45QR 3642 to Hamburg leaves the gate
17 h 50 apart on the timetable, overnight
QR 3642 leaves 17 h 50 after LA 5741 arrives on the timetable: more than half a day, so not a connection we count.