I came across “Tikz: Arrow description closer to arrow” earlier and flagged it as a duplicate, as I don't have enough reputation on tex.se to cast a close vote. I edited the “possible duplicate” comment with a note about the actual change that the code in the question would need. Now I notice that the comment has been deleted, though neither of the other two comments have been deleted. This removes the context of the OP's “thank you” comment (which I realize are discouraged anyhow). I'm not concerned about that so much, but I don't see that the comment was: rude or offensive; not constructive; obsolete; or too chatty. For what other reasons might it have been deleted?
The actual content of the comment wasn't so important, but the code in the question was
(m-1-2) edge node[auto] {$Q(g)$} (m-2-1)
and, based on the question of which it was a duplicate, I pointed out that the code the user would need is
(m-1-2) edge node[auto,inner sep=0pt] {$Q(g)$} (m-2-1)