PDA

View Full Version : Poor quality images in QTextBrowser



scary hallo
6th February 2014, 10:05
Hello,

I use a QTextBrowser to display an HTML-document. If the image needs to be scaled for display, the picture is really poor. It looks as if the QTextBrowser scales the image internally with the Qt::FastTransformation. Is it possible to force the QTextBrowser to use Qt::SmoothTransformation mode somehow?
:confused:

I also tried to scale the Image in the loadResource-method. But I don't know the the size of the image that is given in the HTML-file. I don't want to parse the HTML-file.

Any suggestions?

d_stranz
7th February 2014, 00:02
What does the image look like in a normal web browser (Firefox, IE, Chrome)? Is the quality better when you scale it? If not, you might be stuck with whatever you get from the HTML file.

scary hallo
7th February 2014, 08:59
In firefox and IE the it looks good.
I've made the following test. I looked up the size of the picture given in the HTML-file. Then I scaled the Image in the loadResource-method using the 'Qt::SmoothTransformation'-Mode. The the picture looks good like in Firefox. But in fact I don't know the target-size coming form the HTML-file.