FR 574 then QR 3515 at Barcelona
Bologna → Barcelona → Madrid
Timetable, Barcelona time
20:15FR 574 from Bologna at the gate
16:30QR 3515 to Madrid leaves the gate
20 h 15 apart on the timetable, overnight
QR 3515 leaves 20 h 15 after FR 574 arrives on the timetable: more than half a day, so not a connection we count.