QR 147 then FR 2061 at Madrid
Doha → Madrid → Palma de Mallorca
Timetable, Madrid time
06:35QR 147 from Doha at the gate
06:00FR 2061 to Palma de Mallorca leaves the gate
23 h 25 apart on the timetable, overnight
FR 2061 leaves 23 h 25 after QR 147 arrives on the timetable: more than half a day, so not a connection we count.