<Comment deleted by user>
The Queen is pinned in the g1-a7 diagonal by the black bishop on d4 thus Qxf8 is not a legal move
The queen is pinned by the bishop
<Comment deleted by user>
Qxf8 is illegal because of the Bd4 could take the king.
Edit:
Too slow :(