[Interest] Multi-line text in QLabel!

Lata Agrawal lata.agrawal at enrouteinc.com
Sat Mar 31 16:05:56 CEST 2012

Hi Bob,

I changed text in XML like this:

<text>*<br>First Line</br>Second line*</text>

Its still displaying in a single line.

SOLVED: But I found the mistake in my code. I had set QLabel have the
RichText text format. I removed that and its working now.
Hope that will help someone. if there is a better way of doing it, please
let me know.

Thanks & Regards,

On 31 March 2012 19:25, Bob Hood <bhood2 at comcast.net> wrote:

> On 3/31/2012 7:41 AM, Lata Agrawal wrote:
> > I don't want to use wordwrap because I want to control where to insert
> line
> > breaks in the string displayed. In code, I re-formatted the string read
> from
> > XML file as string read from XML file is converted from \n to \\n.
> I'd probably try changing "\n" to "<br>" and see what that does.
> Render me gone,                       |||
> Bob                                 ^(===)^
> ---------------------------------oOO--(_)--OOo---------------------------------
>    I'm not so good with advice...can I interest you in a sarcastic comment?
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest


*Lata Agrawal
Senior Developer
En Route Media Pvt. Ltd.
*                                 *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120331/9c3e8160/attachment.html>

More information about the Interest mailing list