Qt-interest Archive, August 2007
textEdit->insertHtml() and new lines
Message 1 in thread
I'm trying to add separate lines to a log but unfortunately, whenever I
insert them into a QTextEdit object through the insertHtml() method, all I
get is a continuous line.
For example, the following code generates the following text:
<code>
this->textEdit->moveCursor(QTextCursor::End);
this->textEdit->insertHtml("<p><b>first</b>: pow</p>");
this->textEdit->insertHtml("<p><b>second</b>: pow pow</p>");
</code>
<output>
first: powsecond: pow pow
</output>
I get the same result even if I terminate the string with '\n'.
So, what's wrong with this picture? Am I missing something or is there
something wrong with insertHtml() ?
Thanks in advance
Rui Maciel
--
[ signature omitted ]
Message 2 in thread
Rui Maciel wrote:
> I'm trying to add separate lines to a log but unfortunately, whenever I
> insert them into a QTextEdit object through the insertHtml() method, all I
> get is a continuous line.
>
> For example, the following code generates the following text:
>
> <code>
> this->textEdit->moveCursor(QTextCursor::End);
> this->textEdit->insertHtml("<p><b>first</b>: pow</p>");
> this->textEdit->insertHtml("<p><b>second</b>: pow pow</p>");
> </code>
>
> <output>
> first: powsecond: pow pow
> </output>
>
> I get the same result even if I terminate the string with '\n'.
>
>
> So, what's wrong with this picture? Am I missing something or is there
> something wrong with insertHtml() ?
So doe anyone have a clue about how the paragraphs aren't breakable in HTMl?
Rui Maciel
--
[ signature omitted ]
Message 3 in thread
Hello All,
Does anybody know how to apply "GE Inspira Font" to the application....
Please let me know..how to support this in QT..
Thanks and Regards
Uma.
--
[ signature omitted ]
Message 4 in thread
Rao, UmaMaheswara(GE Healthcare) wrote:
> Hello All,
>
> Does anybody know how to apply "GE Inspira Font" to the application....
>
> Please let me know..how to support this in QT..
>
> Thanks and Regards
> Uma.
See QApplication::setFont(...) in the docs and please open a new thread
for your question(s) next time instead of asking them in a reply to an
other thread.
--
[ signature omitted ]
Message 5 in thread
> Rui Maciel wrote:
>
> > I'm trying to add separate lines to a log but unfortunately, whenever I
> > insert them into a QTextEdit object through the insertHtml() method, all
> I
> > get is a continuous line.
> >
> > For example, the following code generates the following text:
> >
> > <code>
> > this->textEdit->moveCursor(QTextCursor::End);
> > this->textEdit->insertHtml("<p><b>first</b>: pow</p>");
> > this->textEdit->insertHtml("<p><b>second</b>: pow pow</p>");
> > </code>
> >
> > <output>
> > first: powsecond: pow pow
> > </output>
> >
> > I get the same result even if I terminate the string with '\n'.
> >
Try :
<code>
this->textEdit->insertHtml("<p><b>first</b>: pow</p><p><b>second</b>: pow
pow</p>");
<code>
>
> > So, what's wrong with this picture? Am I missing something or is there
> > something wrong with insertHtml() ?
>
> So doe anyone have a clue about how the paragraphs aren't breakable in
> HTMl?
>
>
> Rui Maciel
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
Hope this help.
Regards,
Francisco
Message 6 in thread
put the <br /> tag in where you'd like a newline.
-----Original Message-----
From: gzmorell@xxxxxxxxx [mailto:gzmorell@xxxxxxxxx] On Behalf
Of Francisco Gonzalez
Sent: Wednesday, August 29, 2007 18:08
To: qt-interest@xxxxxxxxxxxxx
Subject: Re: textEdit->insertHtml() and new lines
Rui Maciel wrote:
> I'm trying to add separate lines to a log but
unfortunately, whenever I
> insert them into a QTextEdit object through the
insertHtml() method, all I
> get is a continuous line.
>
> For example, the following code generates the
following text:
>
> <code>
> this->textEdit->moveCursor(QTextCursor::End);
> this->textEdit->insertHtml("<p><b>first</b>:
pow</p>");
> this->textEdit->insertHtml("<p><b>second</b>:
pow pow</p>");
> </code>
>
> <output>
> first: powsecond: pow pow
> </output>
>
> I get the same result even if I terminate the string
with '\n'.
>
Try :
<code>
this->textEdit->insertHtml("<p><b>first</b>:
pow</p><p><b>second</b>: pow pow</p>");
<code>
>
> So, what's wrong with this picture? Am I missing
something or is there
> something wrong with insertHtml() ?
So doe anyone have a clue about how the paragraphs
aren't breakable in HTMl?
Rui Maciel
--
To unsubscribe - send a mail to
qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or
the body.
List archive and information:
http://lists.trolltech.com/qt-interest/
Hope this help.
Regards,
Francisco