Gordon Brown and David Cameron put the question of substance at the heart of the political battle yesterday, as the Tory leader accused his rival of relying on "short-term tricks" in place of long-term solutions.

The prime minister returned fire by attacking Mr Cameron as "good on jokes, but pretty bad on policy", with the two men clashing in aggressive and personal exchanges over the Queen's speech.

"On energy, housing, pensions, education, work-life balance, citizenship and anti-terrorism measures, the central purpose of this legislative programme is to make the right long-term changes to prepare and equip our country for the future and to meet the rising aspirations of the British people," Mr Brown said.

He said Tory policies were "confused, contradictory and not thought-through", adding: "On every major issue, you have failed to face up to the big challenges ahead ... Unaffordable tax cuts and the threat to stability are too big a risk for this country."

Mr Brown also accused Mr Cameron of flunking his "Clause 4 moment" over grammar schools, caving into his party instead of supporting his education spokesman.

But the Tory leader attacked the government for a shortage of competence and vision, accusing it of offering a "culture of spin, deceit and half-truths".

"This Queen's speech doesn't represent - and he doesn't represent - any real change ... That's what the whole country discovered this autumn," Mr Cameron said. "Yes, he can do the gestures. He can wear a blue tie ... He can even get Lady Thatcher round for tea. But when it comes to real, substantive change this prime minister is not capable of offering anything new."

Mr Cameron said the Tories would support bills such as the one on climate change - "not least because we proposed them in the first place" - but added that the speech should have included more dramatic changes to welfare, the police and prisons and handed back power to councils.

The two leaders went head-to-head over the government's promise to lift more people out of inheritance tax, with Mr Cameron challenging the prime minister to "look him in the eye" and say he was planning the changes before the Tories pledged to raise the threshold to £1m.

Mr Brown said: "The answer is yes. An unequivocal yes."

But Mr Cameron insisted: "The difference between our policy and your policy is that we thought of it and you stole it."

The Tory leader also accused the prime minister of borrowing the slogan "British jobs for British workers" from the National Front and BNP - throwing down far-right leaflets which used the phrase and taunting him with the question: "Where's your moral compass now?"

But Vince Cable, the Liberal Democrats' acting leader, accused the Tories of "dog whistle" politics, adding that both parties were engaged in competition for the anti-immigration vote. He warned that they had established a "cosy conservative establishment consensus" on a range of issues. Mr Cable described the prime minister as "a sad figure" struggling to survive rather than generating new ideas.

He added: "The answer isn't necessarily more legislation. But we do need leadership, ideas and vision, not the current drift."