I need to save web page using QT webkit similar to "Save as complete webpage".

Following are my requirements,

1. Save the index html file, maintaining entity encoding.
2. Need to download all linked images and other resources.
3. Need to change resource path in html page to local downloaded path.
4. Need to maintain webpage current state.

I need to do it using standard DOM and QWebElement.

Please provide me some inputs on this.