Using the demo browser that is in Qt you can see the bug. Go to google and type "FooBar" in the line edit and then click search to go to the next page, and now close the tab and you will get the dialog saying you have modified the page. When the main frame url changes qwebpage's d->modified should be set back to false.
This is worth fixing in 4.4.x
This has been fixed in 4.4 and main, but waiting to get merged into trunk.
Fixed in r35709