Draw a Line in a Text Label
-
I am using richtext for items in a label and I would like to draw a continuous line. How do I do this?
-
If you want like this -test- then
@ QLabel *lbl = new QLabel("<s>test</s>", this);@ -
And another popular cases:
@
<b>bold text</b>
<i>highlighting text in italics</i>
<u>underlined text</u>
<s>strikethrough text</s>
<small>small font</small>
<big>large font</big>
@ -
If you just want a horizontal line: "<hr/>"
-
You could use the "text frame feature of a QTextDocument":http://doc.qt.nokia.com/4.7/richtext-cursor.html#frames which can have a border and check, how it looks like in the RTF format.