The example program on this page may be used, distributed and modified without limitation.

Hello, World

This example brings up a message box with a text and a button.
//
// Qt Example Application: hello
//
// Displays a message box with a title and a text.
//

#include <qmsgbox.h>
#include <qapp.h>

int main( int argc, char **argv )
{
    QApplication a( argc, argv );
    return QMessageBox::message( "Attention", "Hello, world!" );
}

Generated at 16:51, 1996/09/24 for Qt version 1.0 by the webmaster at Troll Tech