Qt 6.11 is out! See what's new in the release
blog
How to Capture an Image in a QML
QML and Qt Quick
8
Posts
4
Posters
7.1k
Views
1
Watching
-
I would like to save an image when my QML application is running, just like a camera inside the application,
How can i do that? -
where will be the destination of the saved image that i capture?
-
[quote author="jr_jags" date="1314181801"]where will be the destination of the saved image that i capture?[/quote]
To the application's working path so I'd add a path to the file. something like QDir::homePath() + "/fileName" -
can i use this in QML?
-
so ill use the .cpp file to use screenshot on my qml
-
yes, put the @mlong inside a slot. Optionally you can pass the path to which you want to save as a parameter.