PDA

View Full Version : QTextEdit and HTML div line aligned



Suppaman
3rd June 2013, 08:49
Hi

I'm looking for a way for show a sequence of HTML div elements aligned in line as normal text do into QTextEdit widget. If I try to insert the following HTML code:

<div>aaa</div><div>bbb</div><div>ccc</div><div>ddd</div><div>eee</div><div>fff</div>

I have showed into my QTextEdit:

aaa
bbb
ccc
ddd
eee
fff

On the contrary I woul to have the following:

aaabbbcccdddeeefff

and, as standard text editor, if I resize the widget and, for example, decrease the width the div blocks should show as follow:

aaabbbcccddd
eeefff

Do you know if is possible to reach such result?

Thank you

durm
24th September 2013, 16:37
div - is a block tag.
just use span instead of div

or add to div attribute style with display inline option
<div style="display: inline;"/>