ItemGrabResult QML Type
包含调用Item::grabToImage() 的结果。更多
Import Statement: | import QtQuick |
In C++: | QQuickItemGrabResult |
Inherits: |
属性
方法
- bool saveToFile(fileName)
详细说明
ItemGrabResult 是一个小型容器,用于封装来自Item::grabToImage() 的结果。
另请参阅 Item::grabToImage().
属性文档
url : url |
该属性包含一个 URL,可与基于 URL 的图像消费者(如 QtQuick::Image 类型)结合使用。
当在 QML 或 JavaScript 中引用ItemGrabResult 时,或者当 URL 引用的图像被使用时,URL 是有效的。
URL 并不代表一个有效的文件或读取位置,它主要是通过Qt Quick'基于图像的类型访问图像的关键。
方法文档
bool saveToFile(fileName) |
将抓取结果作为图像保存到fileName 。如果成功,则返回true
;否则返回false
。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.