Appending text to a KTextBrowser

August Hörandl august.hoerandl at
Mon Feb 4 15:46:07 GMT 2002

Tim wrote:
> Could anyone tell me how to use qstring to append text to a KTextBrowser
> (I am a newbie at this). I have a class with a member
> QString *primeTextString;
> Then in one of the methods, I am trying to add  text in a Ktextbrowser:
> primeTextString=new QString("Hello");
> primeTextBrowser->setText(primeTextString);

1) this calls setText() with a Pointer to a QString
> I know I can use a const call like this:
> primeTextBrowser->setText(QString("Hello"));

2) here you call setText() with a QString - no pointer

if 2) works: try this instead of 1)

August Hörandl                               august.hoerandl at
NT has low MTB-BSD numbers (mean time between blue screen of death)

to unsubscribe from this list send an email to kdevelop-request at with the following body:
unsubscribe »your-email-address«

More information about the KDevelop mailing list