QQuickItemGrabResult Class
The QQuickItemGrabResult contains the result from QQuickItem::grabToImage(). 更多...
头文件: | #include <QQuickItemGrabResult> |
qmake: | QT += quick |
Instantiated By: | ItemGrabResult |
基类: | QObject |
属性
- 1 个属性继承自 QObject
公有函数
QImage | image() const |
bool | saveToFile(const QString &fileName) const |
QUrl | url() const |
- 32 个公有函数继承自 QObject
信号
void | ready() |
- 2 个信号继承自 QObject
其他继承的成员
- 1 个公有槽函数继承自 QObject
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 9 个受保护的函数继承自 QObject
- 2 个受保护的变量继承自 QObject
详细描述
The QQuickItemGrabResult contains the result from QQuickItem::grabToImage().
参见 QQuickItem::grabToImage().
属性
image : const QImage
This property holds the pixel results from a grab.
If the grab is not yet complete or if it failed, an empty image is returned.
访问函数:
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.
访问函数:
QUrl | url() const |
成员函数
[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
.