Darian Mackinnon, who had earlier been denied by Queens goalkeeper Calum Antell, put Alex Neil's side ahead with a well-taken effort after 39 minutes. Andy Ryan sealed the victory 10 minutes from time from Tony Andreu's cutback.
Queens had their chances before Ryan's clinching goal, Gavin Reilly shooting wide when he only had goalkeeper Kevin Cuthbert to beat and Mark Durnan heading against a post from a Chris Mitchell free-kick.
Cuthbert also produced a stunning save to keep out a Derek Lyle volley early in the second half, but Hamilton were the more inventive side over the 90 minutes.
Falkirk maintained their impressive start with a 3-0 win at Livingston in which Phil Roberts helped himself to a hat-trick.
The 19-year-old swept home the opener on the half-hour and fired home a half-volley for his second four minutes from the break. Roberts completed his treble by heading home a Kieran Duffie cross after 54 minutes.
Dumbarton enjoyed their first league win of the season, beating Morton 3-1 at The Bet Butler Stadium. Home manager Ian Murray handed debuts to new signings Hugh Murray and Colin Nish and both played their part. Mitch Megginson put Dumbarton ahead after good work from Nish in the 18th minute, but Dougie Imrie equalised from the penalty spot within 60 seconds after Scott Smith was penalised.
Nish scored a debut goal three minutes from half-time with a calm finish - after some careless Morton defending - and Steven McDougall headed a late clincher.
Alloa Athletic made home advantage count as they defeated Cowdenbeath 3-1, leaving their opponents still searching for their first points.
The game burst into life when Ben Gordon put Alloa in front five minutes into the second half by heading home Ryan McCord's corner-kick.
Kane Hemmings equalised five minutes later with a header from a free-kick and Andy Russell hit the crossbar for Cowdenbeath as they looked as if they could go on to take all three points.
But Alloa regained the upper hand when Andy Kirk scored with a neat finish and Eddie Ferns added a third.
Dundee will feel they should have taken more than a point from their 0-0 draw with Raith Rovers at Stark's Park. They dominated for long spells in the first half and passed up several chances in a 10-minute spell before the interval when they passed up several chances.
Raith improved in the second half and Grant Anderson twice tested Dundee goalkeeper Kyle Letheren. But John Brown's side always looked the more likely to score and only a magnificent one-handed David McGurn save kept out Declan Gallagher's 68th-minute header.