PySide6.QtGui.QBackingStore¶
- class QBackingStore¶
The
QBackingStoreclass provides a drawing area forQWindow.Details
QBackingStoreenables the use ofQPainterto paint on aQWindowwith type RasterSurface. The other way of rendering to aQWindowis through the use of OpenGL withQOpenGLContext.A
QBackingStorecontains a buffered representation of the window contents, and thus supports partial updates by usingQPainterto only update a sub region of the window contents.QBackingStoremight be used by an application that wants to useQPainterwithout OpenGL acceleration and without the extra overhead of using the QWidget or QGraphicsView UI stacks. For an example of how to useQBackingStoresee the Raster Window Example .Synopsis¶
Methods¶
def
__init__()def
beginPaint()def
endPaint()def
flush()def
paintDevice()def
resize()def
scroll()def
size()def
staticContents()def
window()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Constructs an empty surface for the given top-level
window.Begins painting on the backing store surface in the given
region.You should call this function before using the
paintDevice()to paint.See also
- endPaint()¶
Ends painting.
You should call this function after painting with the
paintDevice()has ended.See also
- flush(region[, window=None[, offset=QPoint()]])¶
Flushes the given
regionfrom the specifiedwindowonto the screen.The
windowmust either be the top level window represented by this backingstore, or a non-transient child of that window. PassingNonefalls back to using the backingstore’s top level window.If the
windowis a child window, theregionshould be in child window coordinates, and theoffsetshould be the child window’s offset in relation to the backingstore’s top level window.You should call this function after ending painting with
endPaint().- hasStaticContents()¶
- Return type:
bool
Returns a boolean indicating if this window has static contents or not.
- paintDevice()¶
- Return type:
Returns the paint device for this surface.
Warning
The device is only valid between calls to
beginPaint()andendPaint(). You should not cache the returned value.Sets the size of the window surface to
size.See also
Scrolls the given
areadxpixels to the right anddydownward; bothdxanddymay be negative.Returns
trueif the area was scrolled successfully; false otherwise.Set
regionas the static contents of this window.See also
Returns the current size of the window surface.
Returns a
QRegionrepresenting the area of the window that has static contents.See also
Returns a pointer to the top-level window associated with this surface.