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

bool QWidget::close (  )  [slot, inherited]

Closes this widget. Returns true if the widget was closed; otherwise returns false.

First it sends the widget a QCloseEvent. The widget is hidden if it accepts the close event. If it ignores the event, nothing happens. The default implementation of QWidget::closeEvent() accepts the close event.

If the widget has the Qt::WA_DeleteOnClose flag, the widget is also deleted. A close events is delivered to the widget no matter if the widget is visible or not.

The QApplication::lastWindowClosed() signal is emitted when the last visible primary window (i.e. window with no parent) with the Qt::WA_QuitOnClose attribute set is closed. By default this attribute is set for all widgets except transient windows such as splash screens, tool windows, and popup menus.

Definition at line 6795 of file qwidget.cpp.

Referenced by BlockingClient::BlockingClient(), Client::Client(), QMdiArea::closeAllSubWindows(), QApplication::closeAllWindows(), QApplication::commitData(), ImageViewer::createActions(), MainWindow::createActions(), InformationWindow::createButtons(), Screenshot::createButtonsLayout(), DropSiteWindow::DropSiteWindow(), QMdiSubWindow::eventFilter(), QSplashScreen::finish(), QWidget::keyPressEvent(), QMenu::keyPressEvent(), QMdiSubWindow::mouseDoubleClickEvent(), DragLabel::mousePressEvent(), QWidget::mousePressEvent(), FindFileDialog::openFile(), PreviewWindow::PreviewWindow(), MainWindow::setupActions(), and TableEditor::TableEditor().

    return d_func()->close_helper(QWidgetPrivate::CloseWithEvent);

Generated by  Doxygen 1.6.0   Back to index