QR 149 then FR 9602 at Madrid
Doha → Madrid → Rome
Timetable, Madrid time
13:50QR 149 from Doha at the gate
07:40FR 9602 to Rome leaves the gate
17 h 50 apart on the timetable, overnight
FR 9602 leaves 17 h 50 after QR 149 arrives on the timetable: more than half a day, so not a connection we count.