PySide6.QtQuick.QQuickItemGrabResult¶
- class QQuickItemGrabResult¶
- The - QQuickItemGrabResultcontains the result from- grabToImage(). More…- Synopsis¶- Properties¶- Methods¶- def - image()
- def - saveToFile()
- def - url()
 - Signals¶- def - ready()
 - 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 - Detailed Description¶- See also - Note - Properties can be used directly when - from __feature__ import true_propertyis used or via accessor functions otherwise.- 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).- Access functions:
 - 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 - QQuickItemGrabResultobject 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. - Access functions:
 - Getter of property - imageᅟ.- ready()¶
 - This signal is emitted when the grab has completed. - saveToFile(fileName)¶
- Parameters:
- fileName – str 
- Return type:
- bool 
 
 - Saves the grab result as an image to - fileName. Returns- trueif successful; otherwise returns- false.- Note - In Qt versions prior to 5.9, this function is marked as non- - const.- saveToFile(fileName)
- Parameters:
- fileName – - 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- trueif successful; otherwise returns- false.- Getter of property - urlᅟ.