I am processing an image using opencv during runtime and want to display the updated version of this image in QML using imageView, i currently am creating a new image file at runtime and reassigning its path to the imageView in QML, is there any better method for this?
Asked
Active
Viewed 456 times
-3
-
Maybe you can use a similar approach: http://stackoverflow.com/questions/27429371/qml-and-c-image-interoperability/27429586#27429586 – dtech Apr 12 '15 at 15:00
-
3What's an imageView? – Mitch Apr 12 '15 at 15:29
-
If I had to guess, I'd say it is something that views an image. However, his problem is a simple as the design flaw with Qt properties where internal changes do not emit a changed() signal, only a reassignment. The solution is only reassign a thin wrapper still pointing to the internally changed object, this fakes a reassignment without doing the costly data copy. – dtech Apr 12 '15 at 17:49
1 Answers
0
If I understand the question correctly, I do this by connecting a changed signal emitted from the c++ code and connect it to a receiver that forces a reload on the qml side :
// MyImage.qml
Image {
cache: false
function reload() {
var tmpSource = source;
source = "";
source = tmpSource;
}
}

GrecKo
- 6,615
- 19
- 23