Lag.
I've seen this a few times myself, I click the "Complete Quest" button, and that "Quest Complete!" tune plays, but the window stays there, and clicking the button does nothing.
If you look in your chat log, you will notice that you did in fact gain the appropriate quest rewards.
Easiest way to tell if this is the case, is to simply close the dialogue window. If the ? disappeared, then you did in fact turn the quest in, the game just didn't close the window. Usually happens when an NPC is supposed to immediately pop a new quest window, but not always.