summaryrefslogtreecommitdiffstats
path: root/examples/gui/doc/src/rasterwindow.qdoc
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2016-09-14 15:01:13 +0200
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2016-09-22 16:45:15 +0000
commit0deb0796a42a64930f2d977cd4041c5f1c047187 (patch)
tree3b35aba7908a19987f38f0577da878ddfd199596 /examples/gui/doc/src/rasterwindow.qdoc
parent524b59b0f51b554ecabbf2663891f9ae1650d122 (diff)
Modernize rasterwindow/openglwindow examples to use requestUpdate()
Change-Id: Ib8d0c42db7343247d0431ea008eb17da9ee98f4d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'examples/gui/doc/src/rasterwindow.qdoc')
-rw-r--r--examples/gui/doc/src/rasterwindow.qdoc15
1 files changed, 6 insertions, 9 deletions
diff --git a/examples/gui/doc/src/rasterwindow.qdoc b/examples/gui/doc/src/rasterwindow.qdoc
index 963d09971d..d276925059 100644
--- a/examples/gui/doc/src/rasterwindow.qdoc
+++ b/examples/gui/doc/src/rasterwindow.qdoc
@@ -143,19 +143,16 @@
\snippet rasterwindow/rasterwindow.cpp 6
We went through a few places where the window needed to repainted
- immediately. There are some cases where this is not desierable,
+ immediately. There are some cases where this is not desirable,
but rather let the application return to the event loop and
- later. We acheive this by posting an even to ourself which will
- then be delivered when the application returns to the \l
- QGuiApplication event loop. To avoid posting new requests when one
- is already pending, we store this state in the \c m_update_pending
- variable.
+ schedule the repaint for later. We achieve this by requesting
+ an update, using QWindow::requestUpdate(), which will then be
+ delivered when the system is ready to repaint.
\snippet rasterwindow/rasterwindow.cpp 7
We reimplement the virtual \l QObject::event() function to handle
- the update event we posted to ourselves. When the event comes in
- we reset the pending update flag and call renderNow() to render
- the window right away.
+ the update event. When the event comes in we call renderNow() to
+ render the window right away.
*/