I use the following code to generate PDF:
html="<htm><head></head><body><a href="a.html"><img src="a.png"/></a><a href="b.html">b</a></body></html>;
QTextDocument document;
document.setHtml(html);
QPrinter printer(QPrinter::PrinterResolution);
printer.setOutputFormat(QPrinter::PdfFormat);
printer.setOutputFileName("a.pdf");
document.print(&printer);
However, there is no hyperlink on the image. The link on the text is good. How to add hyperlink on img element?