Donald J. Trump’s recent rough patch has taken a toll on his standing in three crucial swing states, according to a new poll that shows voters in Florida, Ohio and Pennsylvania viewing Hillary Clinton as being better prepared to be president.

A survey from Quinnipiac University found Mrs. Clinton leading Mr. Trump by a margin of 47 percent to 39 percent in Florida, where they were essentially tied in May. Mrs. Clinton also erased Mr. Trump’s narrow lead in Ohio, where the candidates are now deadlocked at 40 percent. In Pennsylvania, Mrs. Clinton leads by a single percentage point.

The polls had margins of error of plus or minus three percentage points, rendering Ohio and Pennsylvania very much up for grabs a month before Republicans hold their nominating convention July 18-21 in Cleveland.

Many leading Republicans have struggled to embrace Mr. Trump so far and there are signs that the discord is doing damage. Peter Brown, assistant director of the Quinnipiac Poll, said that the lingering infighting within the Republican Party was hurting Mr. Trump’s standing and that political parties usually show more loyalty toward their standard-bearers.