[PySide] QLabel vs QWebView for simple html display

Frank Rueter | OHUfx frank at ohufx.com
Tue Nov 12 05:26:59 CET 2013

Hi all,

I have a QLabel in my app that displays some very simple html code 
pulled from a website.

So far I have been using it successfully as a sort of news feed, but now 
I need to display an image from a url as well, which QLabel can't do afaik.

So I had a go with QWebView but that just won't be have the same as 
QLabel when it comes to background colour (tried to set it to be 
transparent), sizes, size policies etc.
I'm also getting some redraw problems when the QWebView is set to a 
transparent background.

Here is some test code:

Is it the right approach to force QWebView to behave like QLabel for the 
sole reason of being able to display an image via html? Or is there a 
simpler way of doing this?


More information about the PySide mailing list