Skip to content Skip to sidebar Skip to footer

Pdf With Qwebview: Missing Refresh/repaint After Loading

I use the QWebView (python 3.3 + pyside 1.1.2 + Qt 4.8) as FileViewer. Picture, Text, HTML, ... all fine, but PDF has a display problem. I tested two possible ways. internal pdf v

Solution 1:

I just solved a similar problem cleaning the QWebView before every pdf load. Be careful with the loadFinished() signal.

In your example:

self.PreviewBox.load(QUrl('about:blank'))

or, in case we don't like 'about:blank' this may be a more portable solution:

self.PreviewBox.setHtml('<html><head></head><title></title><body></body></html>')

Post a Comment for "Pdf With Qwebview: Missing Refresh/repaint After Loading"