*pulls out Programming with Objects text*
Well what kind of text do you want? Do you want a button with text? Or do you want a textbox to display/edit text? Try this for starters:
Code:
#include <qapplication.h>
#include <qpushbutton.h>
#include <qvbox.h>
int main( int argc, char **argv )
{
QApplication a( argc, argv );
QVBox box;
box.resize( 200, 120 );
a.setMainWidget( &box );
ta = new QTextEdit( this, "textArea" );
ta->setGeometry(0, 20, 200, 120 );
ta->setTextFormat( Qt::PlainText );
ta->setFont( QFont( "Courier" ) );
ta->setText("Hello world!");
//ta->clear(); // This will clear the text
box.show();
return a.exec();
}
No guarantees on that working though. Its been a while since I've played around with QT