The QQuickItemGrabResult contains the result from QQuickItem::grabToImage (). 更多...
头: | #include <QQuickItemGrabResult> |
qmake: | QT += quick |
实例化: | ItemGrabResult |
继承: | QObject |
QImage | image () const |
bool | saveToFile (const QString & fileName ) const |
QUrl | url () const |
void | ready () |
const QMetaObject | staticMetaObject |
The QQuickItemGrabResult contains the result from QQuickItem::grabToImage ().
另请参阅 QQuickItem::grabToImage ().
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()
将返回
true
).
访问函数:
QImage | image () const |
This property holds a URL which can be used in conjunction with URL based image consumers, such as the QtQuick::Image 类型。
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.
访问函数:
QUrl | url () const |
[signal]
void
QQuickItemGrabResult::
ready
()
This signal is emitted when the grab has completed.
Saves the grab result as an image to fileName . Returns true if successful; otherwise returns false.
注意:
In Qt versions prior to 5.9, this function is marked as non-
const
.
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .