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

void QWidget::update (  )  [slot, inherited]

Updates the widget unless updates are disabled or the widget is hidden.

This function does not cause an immediate repaint; instead it schedules a paint event for processing when Qt returns to the main event loop. This permits Qt to optimize for more speed and less flicker than a call to repaint() does.

Calling update() several times normally results in just one paintEvent() call.

Qt normally erases the widget's area before the paintEvent() call. If the Qt::WA_OpaquePaintEvent widget attribute is set, the widget is responsible for painting all its pixels with an opaque color.

See also:
repaint() paintEvent(), setUpdatesEnabled(), {Analog Clock Example}

Reimplemented in FindFileDialog, FindFileDialog, and Q3DataBrowser.

Definition at line 1192 of file qbackingstore.cpp.

References QWidget::updatesEnabled.

Referenced by QMenuBar::actionEvent(), QMenu::actionEvent(), Q3Header::addLabel(), AnalogClock::AnalogClock(), QLineEdit::changeEvent(), QWidget::changeEvent(), QDockWidget::changeEvent(), Q3ListBox::changeEvent(), Q3ListView::changeEvent(), Q3ComboBox::changeItem(), ScribbleArea::clearImage(), QTreeView::collapse(), QTreeView::columnCountChanged(), Q3IconView::contentsDragMoveEvent(), Q3IconView::contentsMouseReleaseEvent(), MyClass::createImage(), SortingBox::createShapeItem(), Q3ComboBox::currentChanged(), PieView::dataChanged(), QLineEdit::dragLeaveEvent(), QLineEdit::dragMoveEvent(), Q3TextEdit::drawCursor(), Q3IconView::drawDragShapes(), ScribbleArea::drawLineTo(), Q3ListBox::drawRubber(), QLineEdit::dropEvent(), QToolButton::enterEvent(), QGLWidget::event(), QSplitterHandle::event(), QTabBar::event(), QGroupBox::event(), QWidget::event(), QAbstractItemView::event(), QDockWidget::event(), QStatusBar::event(), QMdiSubWindow::event(), Q3MainWindow::event(), QMdiSubWindow::eventFilter(), QWindowsStyle::eventFilter(), QX11EmbedContainer::eventFilter(), QGroupBox::focusInEvent(), QComboBox::focusInEvent(), QWidget::focusInEvent(), QLineEdit::focusInEvent(), QComboBox::focusOutEvent(), QLineEdit::focusOutEvent(), QWidget::focusOutEvent(), Q3Header::handleColumnMove(), QLineEdit::inputMethodEvent(), Q3IconView::insertItem(), Q3ComboBox::insertItem(), Q3ComboBox::insertStringList(), Q3ComboBox::insertStrList(), QLineEdit::keyPressEvent(), Q3Header::keyPressEvent(), QDateTimeEdit::keyPressEvent(), QToolButton::leaveEvent(), QMdiSubWindow::leaveEvent(), TabletCanvas::loadImage(), QTreeView::mouseDoubleClickEvent(), QRadioButton::mouseMoveEvent(), QGroupBox::mouseMoveEvent(), StarEditor::mouseMoveEvent(), QCheckBox::mouseMoveEvent(), QScrollBar::mouseMoveEvent(), QMdiSubWindow::mouseMoveEvent(), MandelbrotWidget::mouseMoveEvent(), QGraphicsView::mouseMoveEvent(), QMdiSubWindow::mousePressEvent(), SortingBox::mousePressEvent(), QTreeView::mousePressEvent(), CharacterWidget::mousePressEvent(), TicTacToe::mousePressEvent(), QGroupBox::mousePressEvent(), DragLabel::mousePressEvent(), QLineEdit::mousePressEvent(), QSlider::mousePressEvent(), QMenu::mousePressEvent(), QMenuBar::mousePressEvent(), PieView::mouseReleaseEvent(), QGraphicsView::mouseReleaseEvent(), QGroupBox::mouseReleaseEvent(), QSlider::mouseReleaseEvent(), QMdiSubWindow::mouseReleaseEvent(), Q3ScrollView::moveContents(), QTreeView::moveCursor(), PieView::moveCursor(), SortingBox::moveItemTo(), CannonField::moveShot(), CannonField::newTarget(), CircleWidget::nextAnimationFrame(), ScribbleArea::openImage(), Q3TextEdit::optimAppend(), TetrixBoard::pause(), Q3ComboBox::popup(), QSvgWidget::QSvgWidget(), Q3ListView::removeColumn(), TetrixBoard::removeFullLines(), Q3ComboBox::removeItem(), Q3Header::removeLabel(), PictureFlow::render(), QWidget::repaint(), Q3IconView::repaintSelectedItems(), QGraphicsView::resetCachedContent(), Q3ScrollView::resizeContents(), Q3Header::resizeEvent(), QAbstractSpinBox::resizeEvent(), ScribbleArea::resizeEvent(), Q3Header::resizeSection(), CannonField::restartGame(), QTreeView::rowsInserted(), MandelbrotWidget::scroll(), QAbstractScrollArea::scrollContentsBy(), QGraphicsView::scrollContentsBy(), PieView::scrollTo(), CannonField::setAngle(), RenderArea::setAntialiased(), CircleWidget::setAntialiased(), RenderArea::setBrush(), Q3CanvasView::setCanvas(), Q3ListView::setColumnWidth(), QWidget::setContentsMargins(), RenderArea::setFillGradient(), RenderArea::setFillRule(), CircleWidget::setFloatBased(), Q3GroupBox::setFrameStyle(), QFrame::setFrameStyle(), CannonField::setGameOver(), Q3Header::setLabel(), Q3ComboBox::setLineEdit(), QComboBox::setLineEdit(), QWidget::setMask(), QPushButton::setMenu(), QToolButton::setMenu(), RenderArea::setOperations(), QWebView::setPage(), RenderArea::setPen(), RenderArea::setPenColor(), RenderArea::setPenWidth(), QGraphicsView::setRenderHint(), QTableView::setRootIndex(), QComboBox::setRootModelIndex(), RenderArea::setRotationAngle(), QGraphicsView::setScene(), PieView::setSelection(), QLineEdit::setSelection(), RenderArea::setShape(), Q3Header::setSortIndicator(), QApplication::setStyle(), QTabBar::setTabEnabled(), QTabBar::setTabIcon(), QTabBar::setTabTextColor(), QGraphicsView::setTransform(), RenderArea::setTransformed(), Q3CanvasView::setWorldMatrix(), ShapedClock::ShapedClock(), QAbstractSlider::sliderChange(), TabletCanvas::tabletEvent(), QWindowsStyle::timerEvent(), QPlastiqueStyle::timerEvent(), WigglyWidget::timerEvent(), QMotifStyle::timerEvent(), GLWidget::timerEvent(), TetrixBoard::tryMove(), Q3Canvas::update(), QWidget::update(), Q3Table::updateCell(), Q3IconView::updateContents(), Q3ScrollView::updateContents(), CharacterWidget::updateFont(), MandelbrotWidget::updatePixmap(), QGraphicsView::updateScene(), CharacterWidget::updateSize(), CharacterWidget::updateStyle(), QTreeView::viewportEvent(), WorldTimeClock::WorldTimeClock(), QX11EmbedContainer::x11Event(), and MandelbrotWidget::zoom().

{
    if(!isVisible() || !updatesEnabled())
        return;
    QWidgetBackingStore::updateWidget(this, rect());
}


Generated by  Doxygen 1.6.0   Back to index