How to use QML Camera image in c++ code
-
This should be possible. After you take a picture, call a method in C++ ( expose a method or class instance from C++). Once you are done with your C++ code, raise a signal and catch it inside QML. I don't see whey this should not be possible?
-
Hi,
From what I understand the Camera element will save the image to a file, which you should then be able to manipulate. Maybe something like the following?
@
Camera {
...
onImageCaptured : {
// pass the preview URL to a processImage function exposed from C++
myApp.processImage(preview)
}
}
@You'd then need to expose the manipulated image back to QML (either as a URL for a saved file, or using QDeclarativeImageProvider) for display.
If you aren't real familiar with the ways QML and C++ can communicate with each other, http://doc.qt.nokia.com/latest/qtbinding.html provides a great reference.
Regards,
Michael