Helpviewer/HelpBrowserWV.py

changeset 38
5fe2b7deab15
parent 13
1af94a91f439
child 96
9624a110667d
equal deleted inserted replaced
37:bfe92e414977 38:5fe2b7deab15
872 .standardIcon(QStyle.SP_MessageBoxWarning, None, self)\ 872 .standardIcon(QStyle.SP_MessageBoxWarning, None, self)\
873 .pixmap(32, 32) 873 .pixmap(32, 32)
874 imageBuffer = QBuffer() 874 imageBuffer = QBuffer()
875 imageBuffer.open(QIODevice.ReadWrite) 875 imageBuffer.open(QIODevice.ReadWrite)
876 if pixmap.save(imageBuffer, "PNG"): 876 if pixmap.save(imageBuffer, "PNG"):
877 html.replace("IMAGE_BINARY_DATA_HERE", 877 html = html.replace("IMAGE_BINARY_DATA_HERE",
878 str(imageBuffer.buffer().toBase64())) 878 bytes(imageBuffer.buffer().toBase64()).decode())
879 html = html.format( 879 html = html.format(
880 title, 880 title,
881 reply.errorString(), 881 reply.errorString(),
882 self.trUtf8("When connecting to: {0}.").format(urlString), 882 self.trUtf8("When connecting to: {0}.").format(urlString),
883 self.trUtf8("Check the address for errors such as <b>ww</b>.example.org " 883 self.trUtf8("Check the address for errors such as <b>ww</b>.example.org "

eric ide

mercurial