summaryrefslogtreecommitdiffstats
path: root/examples/quick/quickwidgets/quickwidget/rotatingsquare.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/quickwidgets/quickwidget/rotatingsquare.qml')
-rw-r--r--examples/quick/quickwidgets/quickwidget/rotatingsquare.qml6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/quick/quickwidgets/quickwidget/rotatingsquare.qml b/examples/quick/quickwidgets/quickwidget/rotatingsquare.qml
index 0c25eddf88..03b1114d20 100644
--- a/examples/quick/quickwidgets/quickwidget/rotatingsquare.qml
+++ b/examples/quick/quickwidgets/quickwidget/rotatingsquare.qml
@@ -57,4 +57,10 @@ Rectangle {
anchors.centerIn: parent
text: "Qt Quick running in a widget"
}
+
+ function performLayerBasedGrab(fn) {
+ root.grabToImage(function(result) {
+ result.saveToFile(fn);
+ });
+ }
}