Virginians are far more optimistic about the direction of the state than that of the nation, and they are generally pleased with the performance of most of their elected officials, according to a new poll by The Washington Post.

Fifty-two percent of adults polled think that the state is generally moving on the right course, while only 31 percent think the same about the nation, according to the newly released poll.

Even more — 62 percent — approve of the way Gov. Robert F. McDonnell is handling his job, while 26 percent disapprove.

McDonnell, 56, the state’s first Republican governor in eight years, took office last year in the aftermath of the worst recession since the Great Depression. He easily defeated his Democratic opponent, Sen. R. Creigh Deeds (Bath), by running as a pragmatic leader who could work across party lines to solve the state’s economic problems.

More than half of Virginians — 54 percent — say they have just enough money to maintain their standard of living. Nineteen percent say they are getting ahead financially, and 27 percent say they are falling behind. In 2007, 33 percent said they were getting ahead financially, while 16 percent said they were falling behind.

Peykan Peymani, 48, a high-tech salesman from McLean who considers himself an independent but tends to vote Republican, said he thinks that the commonwealth’s economy is robust.

“I think, generally, it’s strong. It’s always been strong,’’ he said. “I don’t believe we feel what the rest of America is feeling. . . . And I want that to continue.”

In his first 15 months in office, McDonnell has focused on creating jobs, streamlining government and securing $2.9 billion in bonds for perennially clogged roads and $100 million for underfunded colleges.

“I think he’s doing fair,’’ said Jane Kilduff, 89, a widow who has lived in Northumberland County in the Northern Neck her entire life. “This is a hard time. I think the state is doing well. I think Virginia has prospered. I think the governor is trying to do what he can.”

McDonnell helped cut $4 billion from the state budget, paring back spending to 2006 levels and not raising taxes. He later announced that the state ended the fiscal year with a surplus of about $403 million.

“I don’t like what he’s doing to education. He’s made all these cuts,” said Cindy Lawson, 59, a legal secretary who lives in Alexandria and generally votes for Democrats. “Then he finds a surplus but doesn’t give the money back to education.”

McDonnell remains popular in all regions of the state, with a 53 percent approval rating in the close-in Washington suburbs, including Arlington and Fairfax counties. In the outer suburbs — including fast-growing Loudoun and Prince William counties — 61 percent say they approve of the way he is doing his job as governor.

The governor gets overwhelmingly positive ratings from his fellow Republicans (82 percent approve) and also scores well among independents (63 percent approve). Even among Democrats, more approve than disapprove of the job he’s doing, 50 percent to 36 percent.

But although he remains popular, Virginians are divided about whether he should be included on a national ticket in 2012.

Thirty-six percent of Virginians said McDonnell would make a good vice president, and 38 percent said he would not. Twenty-six percent had no opinion.

McDonnell has said that he would serve on a national ticket if asked, although he has said he has every intention of finishing his term as governor, which ends in January 2013.

His regular appearances on network news shows have increased after his response last year to President Obama’s State of the Union address and his election as vice chairman of the Republican Governors Association. He has not publicly endorsed any of the 2012 GOP presidential hopefuls, although he recently dined with one of them — former Minnesota governor Tim Pawlenty — in Richmond.

“As much as I’d hate to see him go, I think he could do more for the country as a whole,’’ said Michael Moran, 25, a truck driver from Virginia Beach who votes Republican.

McDonnell was elected in 2009 as part of a Republican sweep in Virginia along with Lt. Gov. Bill Bolling, whom he is supporting for governor in 2013, and Attorney General Ken Cuccinelli II.

Compared with other statewide officials who generally received high marks, Cuccinelli appears to have become a more polarizing figure. Forty-six percent of Virginians polled say they approve of the way the former state senator from Fairfax County is doing his job; 27 percent disapprove. Twenty-seven percent had no opinion.

Cuccinelli has taken on several controversial issues — leading his opponents to accuse him of using his office to further his political agenda.

He advised public colleges that they could not adopt nondiscrimination policies protecting gays. He tangled with academics at the University of Virginia by subpoenaing documents related to the work of a former climate scientist.

Most recently, he advised the State Board of Social Services it could not implement regulations that would halt a practice that some argue allows faith-based organizations in Virginia to discriminate in adoptions.

But Cuccinelli — who has said he would run for reelection in 2013 but has hinted that he might challenge Bolling in the Republican gubernatorial primary — has garnered the most attention for suing the federal government over the constitutionality of the federal health-care overhaul. He won the first round of the suit in December when U.S. District Court Judge Henry E. Hudson ruled that the central plank of the federal law, the requirement that individuals become insured by 2014, is unconstitutional. The federal government is appealing the ruling.

Forty-two percent of Virginians polled support the changes to the health-care system, while 48 percent said they oppose them.

John Ray, 48, who lives in Falls Church, where he works for the Defense Department, called the state’s lawsuit over health care “silly and a waste of time.”

Virginia’s two senators, both Democrats who supported the overhaul, remain popular in the state.

Sixty-one percent of Virginians approve of the way Sen. Mark R. Warner is handling his job. Twenty-four percent disapprove.

The popular former governor has seen his numbers slide a bit since entering Congress — from an all-time high of 80 percent of voters approving of his performance as governor in 2005, after he persuaded a GOP-led legislature to adopt a budget that made record investments in education, public safety and health care by imposing higher sales and cigarette taxes. He faces reelection in 2014.

Fifty-five percent of Virginians approve of the way Sen. James Webb is handling his job. Webb announced in February that he would not run for reelection — opening the door to one of the most high-profile Senate races in the nation next year. A Post poll Sunday showed two former governors — Republican George Allen and Democrat Timothy M. Kaine — are locked in a dead heat 18 months before Election Day.

Twenty-nine percent of those polled have favorable impressions of House Majority Leader Eric Cantor (R-Va.); 24 percent have unfavorable ones, and 48 percent expressed no opinion.

The Post poll was conducted by telephone April 28 to May 4 among a random sample of 1,180 adults in Virginia, including users of both conventional phones and cellphones. The results of the full survey have a margin of sampling error of plus or minus 3.5 percentage points. Sampling, data collection and tabulation were conducted by Abt SRBI of New York.

Polling manager Peyton M. Craighill and staff writers Rosalind S. Helderman and Ben Pershing contributed to this report.