QR 343 then EC 7639 at Lisbon
Doha → Lisbon → Madrid
Timetable, Lisbon time
06:30QR 343 from Doha at the gate
05:55EC 7639 to Madrid leaves the gate
23 h 25 apart on the timetable, overnight
EC 7639 leaves 23 h 25 after QR 343 arrives on the timetable: more than half a day, so not a connection we count.