QWidget::grab() to get an image of the widget
Save the image to a temporary file (QTemporaryFile maybe)
QUrl::fromLocalFile() to get a URL you can use in the src attribute of the img element.
I do not know of a way to suppress the page number when using the print() convenience function.
You will likely get a better quality result by directly rendering to a QPrinter or similar, but this is more work.
Bookmarks