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

QMessageBox::StandardButton QMessageBox::warning ( QWidget parent,
const QString title,
const QString text,
StandardButtons  buttons = Ok,
StandardButton  defaultButton = NoButton 
) [static]

Opens a warning message box with the specified title and text. The standard buttons are added to the message box. defaultButton specifies the button used when Enter is pressed. defaultButton must refer to a button that was given in buttons. If defaultButton is QMessageBox::NoButton, QMessageBox chooses a suitable default automatically.

Returns the identity of the standard button that was clicked. If Esc was pressed instead, the {Default and Escape Keys} {escape button} is returned.

If parent is 0, the message box is an {Qt::ApplicationModal} {application modal} dialog box. If parent is a widget, the message box is {Qt::WindowModal} {window modal} relative to parent.

See also:
question(), information(), critical()

Definition at line 1561 of file qmessagebox.cpp.

Referenced by ClassWizard::accept(), QFileDialog::accept(), BrowserMainWindow::closeEvent(), Q3DataManager::handleError(), Window::insertTextObject(), MainWindow::loadFile(), MainWindow::maybeSave(), MainWindow::metaStateChanged(), ConclusionPage::printButtonClicked(), Window::reportScriptError(), MainWindow::saveFile(), MainWindow::stateChanged(), TableEditor::submit(), and DetailsDialog::verify().

    return showNewMessageBox(parent, Warning, title, text, buttons, defaultButton);

Generated by  Doxygen 1.6.0   Back to index