PDA

View Full Version : Html used in QTextEdit and QTextDocument



nifei
26th February 2009, 07:20
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?

talk2amulya
26th February 2009, 07:29
well, have u tried using stylesheet?

nifei
26th February 2009, 07:41
well, have u tried using stylesheet?

how to set style sheet for QTextEdit's html text?

talk2amulya
26th February 2009, 07:58
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

nifei
26th February 2009, 08:44
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.

Gary7
15th August 2012, 20:38
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