QMessageBox

Section: Misc. Reference Manual Pages (3qt)
Updated: 2 February 2007
Index Return to Main Contents
 

NAME

QMessageBox - Modal dialog with a short message, an icon, and some buttons  

SYNOPSIS

#include <qmessagebox.h>

Inherits QDialog.

 

Public Members


enum Icon { NoIcon = 0, Information = 1, Warning = 2, Critical = 3, Question = 4 }

QMessageBox ( QWidget * parent = 0, const char * name = 0 )

QMessageBox ( const QString & caption, const QString & text, Icon icon, int button0, int button1, int button2, QWidget * parent = 0, const char * name = 0, bool modal = TRUE, WFlags f = WStyle_DialogBorder )

~QMessageBox ()

QString text () const

void setText ( const QString & )

Icon icon () const

void setIcon ( Icon )

const QPixmap * iconPixmap () const

void setIconPixmap ( const QPixmap & )

QString buttonText ( int button ) const

void setButtonText ( int button, const QString & text )

virtual void adjustSize ()

TextFormat textFormat () const

void setTextFormat ( TextFormat )
 

Static Public Members


int information ( QWidget * parent, const QString & caption, const QString & text, int button0, int button1 = 0, int button2 = 0 )

int information ( QWidget * parent, const QString & caption, const QString & text, const QString & button0Text = QString::null, const QString & button1Text = QString::null, const QString & button2Text = QString::null, int defaultButtonNumber = 0, int escapeButtonNumber = -1 )

int question ( QWidget * parent, const QString & caption, const QString & text, int button0, int button1 = 0, int button2 = 0 )

int question ( QWidget * parent, const QString & caption, const QString & text, const QString & button0Text = QString::null, const QString & button1Text = QString::null, const QString & button2Text = QString::null, int defaultButtonNumber = 0, int escapeButtonNumber = -1 )

int warning ( QWidget * parent, const QString & caption, const QString & text, int button0, int button1, int button2 = 0 )

int warning ( QWidget * parent, const QString & caption, const QString & text, const QString & button0Text = QString::null, const QString & button1Text = QString::null, const QString & button2Text = QString::null, int defaultButtonNumber = 0, int escapeButtonNumber = -1 )

int critical ( QWidget * parent, const QString & caption, const QString & text, int button0, int button1, int button2 = 0 )

int critical ( QWidget * parent, const QString & caption, const QString & text, const QString & button0Text = QString::null, const QString & button1Text = QString::null, const QString & button2Text = QString::null, int defaultButtonNumber = 0, int escapeButtonNumber = -1 )

void about ( QWidget * parent, const QString & caption, const QString & text )

void aboutQt ( QWidget * parent, const QString & caption = QString::null )

int message ( const QString & caption, const QString & text, const QString & buttonText = QString::null, QWidget * parent = 0, const char * = 0 ) (obsolete)

bool query ( const QString & caption, const QString & text, const QString & yesButtonText = QString::null, const QString &