Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

void QMessageBox::about ( QWidget parent,
const QString title,
const QString text 
) [static]

Displays a simple about box with title title and text text. The about box's parent is parent.

about() looks for a suitable icon in four locations:

1 It prefers parent->icon() if that exists. If not, it tries the top-level widget containing parent. If that fails, it tries the active window. As a last resort it uses the Information icon.

The about box has a single button labelled "OK".

See also:
QWidget::windowIcon() QApplication::activeWindow()

Definition at line 1960 of file qmessagebox.cpp.

References QIcon::actualSize(), QDialog::exec(), QIcon::pixmap(), setIconPixmap(), QWidget::size, and QWidget::windowIcon.

Referenced by MainWindow::about(), and ImageViewer::about().

    QMessageBox mb(title, text, Information, Ok + Default, 0, 0, parent);
    QIcon icon = mb.windowIcon();
    QSize size = icon.actualSize(QSize(64, 64));

Generated by  Doxygen 1.6.0   Back to index