[Qt-interest] QTextBrowser strange behavior!
Andre Somers
andre at familiesomers.nl
Tue Jun 15 09:56:29 CEST 2010
Hi,
On 15-6-2010 8:02, M. Bashir Al-Noimi wrote:
> On 15/06/2010 06:38 ص, M. Bashir Al-Noimi wrote:
>>
>> Hi,
>>
>>
>> I'm working on creating reports for my database so I used
>> QTextBrowser for its embedded print functionality but I noticed that
>> it changes HTML codes in strange way look at this exmaple:
>>
>>
>> When I tried to set this web page as source html:
>>
>>
>> It changed its HTML code and appeared it as following:
>>
>>
>>
>>
>> why this happened? and how I can render html page in its original code?
>>
>>
First of all, the HTML code is not modified. It is just not completely
rendered.
If you look at the documentation, you will find a section called
"Supported HTML Subset". There, you will find that the support for CSS
in Qts HTML rendering is rather limited. Many of the missing important
properties are available as old-fashioned attributes, but not as CSS
properties. That includes the alignment and width properties you are
relying on. I know, it is very unfortunate. I ran into it myself before.
If you want proper HTML rendering with full CSS support, use QtWebkit
for your rendering needs instead of QTextBrowser.
André
--
Nokia Certified Qt Developer.
Interested in Qt related job offers or freelance Qt consulting work.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100615/e120c186/attachment.html
More information about the Qt-interest-old
mailing list