このページでは

ItemGrabResult QML Type

Item::grabToImage() をコールした結果が格納されます。詳細...

Import Statement: import QtQuick
In C++: QQuickItemGrabResult
Inherits:

QtObject

プロパティ

方法

詳細説明

ItemGrabResult は、Item::grabToImage() の結果をカプセル化するために使用される小さなコンテナです。

Item::grabToImage()も参照してください

プロパティの説明

image : variant [read-only]

このプロパティは、QImage の形式でグラブのピクセル結果を保持する。

url : url [read-only]

このプロパティは URL を保持し、QtQuick::Image タイプのような URL ベースの画像コンシューマと組み合わせて使用することができます。

URL は、QML や JavaScript でItemGrabResult を参照している間、あるいは URL が参照している画像がアクティブに使用されている間、有効です。

URLは有効なファイルや読み込む場所を表すものではなく、主にQt Quick の画像ベースの型を通して画像にアクセスするためのキーです。

メソッドのドキュメント

bool saveToFile(fileName)

グラブの結果を画像としてfileName に保存する。成功すればtrue を返し、そうでなければfalse を返す。

© 2026 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.