Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, October 2006
Re: Ignoring missing images in HTML


Message 1 in thread

Puneet Rastogi a écrit :
> Thanks Gert.
> That worked.
> 
> Let me know if you are aware of any way of just ignoring all the images 
> being loaded in a QTextBrowser.

 From the QTextEdit documentation:
	http://doc.trolltech.com/3.3/qtextedit.html
	The images identified by image tags are displayed if they
	can be interpreted using the text edit's QMimeSourceFactory;
	see setMimeSourceFactory().
Therefore the images should be ignored if they cannot be found. Isn't 
that what happens? Otherwise you could write an alternate 
QMimeSourceFactory and set it up using QTextEdit::setMimeSourceFactory.

> This may be through any PI, or by deriving from any class.

What is a PI?

--
 [ signature omitted ] 

Message 2 in thread

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
The unfound images are being ignored, but they issue warning messages
on console.<br>
As of now, I have suppressed these warnings by using qInstallMsgHandler.<br>
<br>
Just wanted to know if there is a better way of doing it through a PI
(used as short form of API).<br>
<br>
Thanks<br>
Puneet<br>
<br>
Dimitri wrote:
<blockquote cite="midefnu1a$cr8$1@xxxxxxxxxxxxxxxxxx" type="cite">Puneet
Rastogi a &eacute;crit :
  <br>
  <blockquote type="cite">Thanks Gert.
    <br>
That worked.
    <br>
    <br>
Let me know if you are aware of any way of just ignoring all the images
being loaded in a QTextBrowser.
    <br>
  </blockquote>
  <br>
From the QTextEdit documentation:
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;<a class="moz-txt-link-freetext" href="http://doc.trolltech.com/3.3/qtextedit.html";>http://doc.trolltech.com/3.3/qtextedit.html</a>
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;The images identified by image tags are displayed if they
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;can be interpreted using the text edit's QMimeSourceFactory;
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;see setMimeSourceFactory().
  <br>
Therefore the images should be ignored if they cannot be found. Isn't
that what happens? Otherwise you could write an alternate
QMimeSourceFactory and set it up using QTextEdit::setMimeSourceFactory.
  <br>
  <br>
  <blockquote type="cite">This may be through any PI, or by deriving
from any class.
    <br>
  </blockquote>
  <br>
What is a PI?
  <br>
  <br>
--
 [ signature omitted ] 

Windows bitmap