QML Component Screen Rendering
qml, qt-quick
Solution
Yes, you could set up your state transitions to call `QWidget::grab` then save it to a file through `QPixmap`.
If you need an example of how to set up your code to call `QWidget::grab` take a look at this answer: How to take ScreenShot Qt/QML
It's important to replace `QPixmap::grabWidget` with `QWidget::grab` because `QPixmap::grabWidget` is now obsolete. Once you have the `QPixmap` from `QWidget::grab` follow the documentation in `QPixmap` to save to the format you'd like such as jpeg, png, gif.
Here are some links to the documentation to help you out.
QWidget::grab
QPixmap
QPixmap::save
Problem
Is it possible to capture the screen rendering of a QML Component and save it to an image file? I would like to drive a Component through several different states, and capture its visual appearance for documentation purposes, without having to do screen/window captures.