Qt messagebox and a question about front-ends

Gordon Tyler gtyler at iafrica.com
Thu Nov 11 14:06:47 GMT 1999


> Also, in a Qt messagebox, how do I get a variable's contents to appear
> as text. Let's say I have a character variable, s, that has the word Hi
> in it. How do I put the contents of s in the messagebox properties. When
> I create it, I set all the attributes but if I put a variable where it
> takes text, it doesn't run. 

You will have to use some code like:

QString stringVar = QString("Hi");
KMessageBox::show("I say " + stringVar);

(That may not be the right messagebox class but the idea is the same)

Ciao,
Gordon






More information about the KDevelop mailing list