PDA

View Full Version : Multi line display



Percy
30th April 2010, 18:47
Hi there,

I have an application which displays images from a camera and text. For that I am using the item-view architecture, I mean, I have a QGraphicsItem for the image and a QGraphicsTextItem for the text. Everything works nice, as long as I have just one line of text. When I try to display more than one line, it displays all the string in the same line (I use "\n" in the string of text, but it doesn´t work).
How can I configure my text item in order to display multi line text on the screen?

Thanks.

tbscope
30th April 2010, 18:57
I think you need to use html, but the documentation is not very clear.

For example: yourTextItem.setHtml("line 1<br/>line2");