QR 3665 then IB 408 at Barcelona
Cagliari → Barcelona → Madrid
Timetable, Barcelona time
14:50QR 3665 from Cagliari at the gatealso IB 5799, LL 5799, VY 6115
10:35IB 408 to Madrid leaves the gatealso LA 1517, CX 1824, LL 3031, VY 5056, AV 6017, BA 7080, AA 8725
19 h 45 apart on the timetable, overnight
IB 408 leaves 19 h 45 after QR 3665 arrives on the timetable: more than half a day, so not a connection we count.