Results 1 to 7 of 7

Thread: QTextEdit html rendering issues

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2007
    Location
    Fresno - Colombia
    Posts
    26
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTextEdit html rendering issues

    Thanks,

    But if you look the html code you will see that I don't use CSS or other not supported html subset, for
    example, documentation says:

    table Table Supports the following attributes: border, bgcolor (Qt color names or #RRGGBB), cellspacing, cellpadding, width (absolute or relative), and height.

    My tabable is defined with:
    Qt Code:
    1. <table style="text-align: left; width: 300px; height: 58px;" border="1" cellpadding="2" cellspacing="2">
    2. <tbody>
    3. <tr>
    4. <td style="vertical-align: top; width: 180px;">FORMA DE PAGO<br>
    5. </td>
    6. <td style="vertical-align: top; width: 80px;">%37<br>
    7. </td>
    8. </tr>
    9. <tr>
    10. <td style="vertical-align: top;">VALIDEZ DE LA OFERTA<br>
    11. </td>
    12. <td style="vertical-align: top;">%38<br>
    13. </td>
    14. </tr>
    15. </tbody>
    16. </table>
    To copy to clipboard, switch view to plain text mode 

    And it says too that supports align, but if you see this line, I used supported align set:
    Qt Code:
    1. <div style="text-align: right; font-weight: bold;"><big><big>PROPUESTA COMERCIAL</big></big><br>
    2. </div>
    To copy to clipboard, switch view to plain text mode 
    But in QTextEdit text is shown on the left.
    Thanks again.

  2. #2
    Join Date
    Aug 2007
    Location
    Fresno - Colombia
    Posts
    26
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTextEdit html rendering issues

    I just used QWebView, including <QtWebKit/QWebView> and the webkit module on my .pro file too.
    Last edited by haldrik; 17th July 2012 at 03:24.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTextEdit html rendering issues

    Quote Originally Posted by haldrik View Post
    But if you look the html code you will see that I don't use CSS or other not supported html subset
    This:
    html Code:
    1. style="text-align: left; width: 300px; height: 58px;"
    To copy to clipboard, switch view to plain text mode 
    ... is CSS.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Aug 2007
    Location
    Fresno - Colombia
    Posts
    26
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTextEdit html rendering issues

    Ohh, ok, thanks.

  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QTextEdit html rendering issues

    Quote Originally Posted by haldrik View Post
    And it says too that supports align, but if you see this line, I used supported align set:
    Qt Code:
    1. <div style="text-align: right; font-weight: bold;"><big><big>PROPUESTA COMERCIAL</big></big><br>
    2. </div>
    To copy to clipboard, switch view to plain text mode 
    Just to reinforce this, this a is "div" element with a "style" attribute containing CSS properties. The supported attributes for this element are "align" and "dir". Even if "style" were supported here, the allowed CSS subset does not include "text-align".

Similar Threads

  1. Arabic text rendering; issues with parentheses
    By TropicalPenguin in forum Qt Programming
    Replies: 4
    Last Post: 10th September 2013, 09:53
  2. HTML Rendering issues when webview transparency enabled
    By Anil V in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 15th June 2012, 07:38
  3. Mac OS QtWebKit CSS3 rendering issues
    By Chirieac in forum Qt Programming
    Replies: 1
    Last Post: 15th April 2012, 20:05
  4. Replies: 0
    Last Post: 30th November 2008, 16:59
  5. Replies: 1
    Last Post: 19th November 2007, 01:34

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.