Michu grabbed a brace in the 4-1 thrashing of the Rs to take his tally to 18 for the season, following a run of six games without a goal.
Swansea had found themselves short of goals in recent weeks - a matter not helped by the sale of Danny Graham to Sunderland on transfer deadline day.
The Swans had scored just once in seven games prior to facing QPR and Williams is pleased to have conclusively ended that run.
He said: "The gaffer set down a bit of a challenge before the game because we hadn't scored in a few games, we hadn't beaten Chelsea, Sunderland or West Ham.
"We wanted to win, we wanted to play good attacking football and we wanted to finish off our chances."
Of Michu he added: "We were pleased that he scored. He's our main goalscorer, he hadn't scored for a little while, so for him to get a goal was pleasing.
"I don't think it was getting to him, he didn't say anything and he was still performing. When he scores we normally win the game so it was good."