Qt automaticly adds some margins to every QSimpleRichText. What can I do to avoid this behaviour?
Printable View
Qt automaticly adds some margins to every QSimpleRichText. What can I do to avoid this behaviour?
I think it must be related to the parent widget, containing the QSimpleRichText object.
What is exactly the parent widget ?
Guilugi.
no, it is not connected with parent widget.
look at this code:
This "image.jpg" is an green image 150px*150px.Code:
QSimpleRichText rich_text("<img src=image.jpg border=0>", app.font()); buffer.fill(Qt::red); rich_text.draw(&p, 0, 0, rect, app.palette().active()); p.end(); label->setPixmap(buffer); label->show();
Now look at results:
http://www.rejsymorskie.net/smieci/66.png
red borders are QSimpleRichText's margins.
There is a similar thread active about these margins :
see :
http://www.qtcentre.org/forum/showthread.php?t=511
As far as I can see there is no solution yet for QT3.