QQuickItemGrabResult Class
The QQuickItemGrabResult contains the result from QQuickItem::grabToImage(). More...
| Header: | #include <QQuickItemGrabResult> |
| qmake: | QT += quick |
| Instantiated By: | ItemGrabResult |
| Inherits: | QObject |
Properties
- 1 property inherited from QObject
Public Functions
| QImage | image() const |
| bool | saveToFile(const QString &fileName) const |
| QUrl | url() const |
- 30 public functions inherited from QObject
Signals
| void | ready() |
- 2 signals inherited from QObject
Related Non-Members
| typedef | QObjectList |
| QList<T> | qFindChildren(const QObject *obj, const QRegExp ®Exp) |
| T | qobject_cast(QObject *object) |
| T | qobject_cast(const QObject *object) |
Macros
| QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
| Q_CLASSINFO(Name, Value) | |
| Q_DISABLE_COPY(Class) | |
| Q_DISABLE_COPY_MOVE(Class) | |
| Q_DISABLE_MOVE(Class) | |
| Q_EMIT | |
| Q_ENUM(...) | |
| Q_ENUM_NS(...) | |
| Q_FLAG(...) | |
| Q_FLAG_NS(...) | |
| Q_GADGET | |
| Q_INTERFACES(...) | |
| Q_INVOKABLE | |
| Q_NAMESPACE | |
| Q_OBJECT | |
| Q_PROPERTY(...) | |
| Q_REVISION | |
| Q_SET_OBJECT_NAME(Object) | |
| Q_SIGNAL | |
| Q_SIGNALS | |
| Q_SLOT | |
| Q_SLOTS |
Additional Inherited Members
- 1 public slot inherited from QObject
- 9 static public members inherited from QObject
- 9 protected functions inherited from QObject
Detailed Description
See also QQuickItem::grabToImage().
Property Documentation
image : const 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).
Access functions:
| QImage | image() const |
url : const 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.
Access functions:
| QUrl | url() const |
Member Function Documentation
[signal] void QQuickItemGrabResult::ready()
This signal is emitted when the grab has completed.
bool QQuickItemGrabResult::saveToFile(const QString &fileName) const
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.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.