Results 1 to 6 of 6

Thread: Html used in QTextEdit and QTextDocument

  1. #1
    Join Date
    Oct 2008
    Location
    Beijing China
    Posts
    77
    Thanks
    21
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Html used in QTextEdit and QTextDocument

    Hi, All,
    I need to draw tables via Html and set that to QTextDocument, however, subsets those are not listed in the "Support HTML Subset" cannot be used and i cannot draw table like this, because Qt's Scribe Framework seems cannot specify border-top, border-bottom, .etc in table cell. For the same reason, QTextCursor cannot draw table like this. Then how to draw this?
    Attached Images Attached Images

  2. #2
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Html used in QTextEdit and QTextDocument

    well, have u tried using stylesheet?

  3. #3
    Join Date
    Oct 2008
    Location
    Beijing China
    Posts
    77
    Thanks
    21
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Html used in QTextEdit and QTextDocument

    Quote Originally Posted by talk2amulya View Post
    well, have u tried using stylesheet?
    how to set style sheet for QTextEdit's html text?

  4. #4
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Html used in QTextEdit and QTextDocument

    oops, i got it wrong then. u r right, border-top and border-bottom are not supported. but padding-top and padding-bottom and margin-top and margin bottom are there, which u can apply for "td"..it'd be extra work but still should be a solution

  5. The following user says thank you to talk2amulya for this useful post:

    nifei (26th February 2009)

  6. #5
    Join Date
    Oct 2008
    Location
    Beijing China
    Posts
    77
    Thanks
    21
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Html used in QTextEdit and QTextDocument

    Quote Originally Posted by talk2amulya View Post
    oops, i got it wrong then. u r right, border-top and border-bottom are not supported. but padding-top and padding-bottom and margin-top and margin bottom are there, which u can apply for "td"..it'd be extra work but still should be a solution
    in my project only border-bottom is needed, but i cannot even specify the border of a special item.

    how to use padding and margins to hide the top, left and right border in your solution? than k you.

  7. #6
    Join Date
    Aug 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Html used in QTextEdit and QTextDocument

    nifei, I know its been a few years since this was last posted but did you ever figure out how to do this? I need to be able to just show the top boarder of certain rows and am having a lot of trouble doing this

Similar Threads

  1. Drawing on QTextEdit
    By jgrauman in forum Qt Programming
    Replies: 3
    Last Post: 7th February 2009, 09:40
  2. QTextEdit and insertImage() Display on the Fly..
    By Undefined in forum Qt Programming
    Replies: 1
    Last Post: 13th July 2008, 19:48
  3. QTextEdit slow to insert text
    By thomaspu in forum Qt Programming
    Replies: 4
    Last Post: 10th January 2008, 12:05
  4. QTextEdit API questions (plain text)
    By Gaspar in forum Qt Programming
    Replies: 4
    Last Post: 16th May 2006, 06:03

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.