The League One side dominated for much of the game at Loftus Road before Danny Gabbidon's header in the latter stages of the second half gave Rangers their first win in the competition since 2001.
The victory was also Hughes's first since his appointment after the loss at Newcastle over the weekend.
Speaking after the third-round replay win, Hughes said: "I think there was a lack of sharpness as a consequence of playing Sunday-Tuesday and we were a bit leggy and they were excited, but we stuck at it although we know we can play a lot better than that.
"Given the run the team has been on, perhaps there is a lack of confidence in each other. The desire is there for everyone to see, but we can improve."
Rangers will face neighbours Chelsea in the fourth round of the domestic competition.