FR 5712 then QR 152 at Madrid
Budapest → Madrid → Doha
Timetable, Madrid time
09:05FR 5712 from Budapest at the gate
22:05QR 152 to Doha leaves the gate
13 h apart on the timetable
QR 152 leaves 13 h after FR 5712 arrives on the timetable: more than half a day, so not a connection we count.