White gives checkmate in two moves [FEN &quot;5rk1/2Q2ppp/p7/2P5/1p6/1B5P/Pq2nPP1/3R1K2 w - - 0 1&quot;]

White, to move, gives checkmate in two moves. Can anyone find the solution?
The solution is

 1.Qxf7+.  If Kh8, then Qxf8#.  And if Rxf7, then Rd8# - the rook cannot block because it is pinned by the bishop.