Qt messagebox and a question about front-ends

Falk Brettschneider gigafalk at yahoo.com
Fri Nov 12 07:11:19 GMT 1999


Gordon Tyler wrote:
> 
> > 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.
e.g.:

#include <qmessagebox.h>

QString s1("Hi");
QString s2;
s2.setNum( 1);
QString s;
s = s1 + " Nr. " + s2 + "!";
QMessageBox::information( 0 /*parent*/, "window title", s);

-- 

Ciao,
--Falk

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com




More information about the KDevelop mailing list