QQuickItemGrabResult#

The QQuickItemGrabResult contains the result from grabToImage() . More

Inheritance diagram of PySide6.QtQuick.QQuickItemGrabResult

Synopsis#

Functions#

Signals#

Detailed Description#

See also

grabToImage()

class PySide6.QtQuick.QQuickItemGrabResult#
PySide6.QtQuick.QQuickItemGrabResult.image()#
Return type

PySide6.QtGui.QImage

This property holds the pixel results from a grab.

If the grab is not yet complete or if it failed, a null image is returned (image.isNull() will return true).

PySide6.QtQuick.QQuickItemGrabResult.ready()#

This signal is emitted when the grab has completed.

PySide6.QtQuick.QQuickItemGrabResult.saveToFile(fileName)#
Parameters

fileName – str

Return type

bool

Saves the grab result as an image to fileName. Returns true if successful; otherwise returns false.

Note

In Qt versions prior to 5.9, this function is marked as non-const.

PySide6.QtQuick.QQuickItemGrabResult.saveToFile(fileName)
Parameters

fileNamePySide6.QtCore.QUrl

Return type

bool

Saves the grab result as an image to filePath, which must refer to a local file name with a supported image format extension. Returns true if successful; otherwise returns false.

PySide6.QtQuick.QQuickItemGrabResult.url()#
Return type

PySide6.QtCore.QUrl

This property holds a URL which can be used in conjunction with URL based image consumers, such as the QtQuick::Image type.

The URL is valid until the QQuickItemGrabResult object is deleted.

The URL does not represent a valid file or location to read it from, it is primarily a key to access images through Qt Quick’s image-based types.