Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>After checking QWidget::update() source code I've found it calls this method in <code>src/gui/kernel/qwidget.cpp:9544</code> :</p> <pre><code>void QWidget::update(const QRect &amp;rect) { if (!isVisible() || !updatesEnabled() || rect.isEmpty()) return; if (testAttribute(Qt::WA_WState_InPaintEvent)) { QApplication::postEvent(this, new QUpdateLaterEvent(rect)); return; } if (hasBackingStoreSupport()) { QTLWExtra *tlwExtra = window()-&gt;d_func()-&gt;maybeTopData(); if (tlwExtra &amp;&amp; !tlwExtra-&gt;inTopLevelResize &amp;&amp; tlwExtra-&gt;backingStore) tlwExtra-&gt;backingStore-&gt;markDirty(rect, this); } else { d_func()-&gt;repaint_sys(rect); } } </code></pre> <p>As you can see the <code>QUpdateLaterEvent</code> is only posted if the update() is already called from inside a paintEvent() method.</p> <p>You can also check <code>QWidget::repaint(const QRect &amp;rect)</code> source on line 9456 - it lacks <code>testAttribute(Qt::WA_WState_InPaintEvent)</code> check.</p> <p><strong>EDIT</strong></p> <p>The <code>QUpdateLaterEvent</code> is posted as a <code>Qt::NormalEventPriority</code> event, so it gets processed after all other normal priority events (see <code>src/corelib/kernel/qcoreapplication.cpp:971</code> and <code>:1003</code>). You might also want to look into compressEvent code, I haven't checked that.</p> <p>So to finally answer the question: the QUpdateLaterEvent is processed after other high and normal priority events that were in queue before it was posted.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload