Would Qg2 be checkmate? I am confused because his rook on g8 is pinned so theoretically black would not be aloud to capture white's king if white's king captured black's queen on g2, but at the same time white's king could not move itself into check. I would think the Qg2 would still be checkmate but I am not positive.
Question about checkmate rules

Qg2 is checkmate because capturing the black queen puts your white king into check and you can't ever move into check. It doesn't matter that the black rook couldn't move to capture the king.

Let's ignore the rule about the king can't move or be exposed to check on your turn for a minute. Checkmate is check with mate (king capture) to follow, so in your diagram if Qg2 check, will there be mate (king capture) to follow? Yes. Does it matter then if doing so would put your king in check with mate to follow? No, the white king is captured first and the game has ended, white never gets the chance to capture the black king.
Hope that clarifies the situation better for you.