QR 147 then FR 8248 at Madrid
Doha → Madrid → Milan
Timetable, Madrid time
06:35QR 147 from Doha at the gate
05:45FR 8248 to Milan leaves the gate
23 h 10 apart on the timetable, overnight
FR 8248 leaves 23 h 10 after QR 147 arrives on the timetable: more than half a day, so not a connection we count.