[Qt-qml] Snapshot of QML document
michael.brasser at nokia.com
michael.brasser at nokia.com
Thu Aug 19 00:23:02 CEST 2010
On 17/08/2010, at 5:41 PM, ext Pavol Rusnak wrote:
> I would like to ask whether there is an effective way how to create a
> snapshot or screenshot of QML document. Currently I use this hack:
>
> qmlviewer foo.qml -recordfile out.png -recordrate 100 -autorecord 11
>
> But I need to kill qmlviewer afterwards and remove "0000" from
> out0000.png filename.
>
> Something like
>
> qmlviewer foo.qml -snapshot foo.png
>
> (immediately exiting after creating foo.png) is what I need. Is there
> such an option or it is not yet implemented?
Hi,
There is a snapshot feature (Recording menu -> Take Snapshot; keyboard shortcut F3 or just plain 3 if you are running with -devicekeys), but that will not immediately exit either.
You could also have a look at the visual test tool (in tests/auto/declarative/qmlvisual/) -- it has a -recordsnapshot mode that will immediately exit (but that generates some additional files as well as the snapshot).
Michael
More information about the Qt-qml
mailing list