Load image from C++ on QML
-
This post is deleted!
-
This post is deleted!
@JANG-SOONMYUN said in Load image from C++ on QML:
Please help me to solve it.
According to your code, you called your image provider
image
and notImageProvider
:engine.addImageProvider(QLatin1String("image"), image_provider);
so this should work:
Image { source: "image://image/" + currentFrameNumber}
-
@JANG-SOONMYUN said in Load image from C++ on QML:
Please help me to solve it.
According to your code, you called your image provider
image
and notImageProvider
:engine.addImageProvider(QLatin1String("image"), image_provider);
so this should work:
Image { source: "image://image/" + currentFrameNumber}
@KroMignon Thank you for reply. But it still doesn't work.
-
The initial example combines several possibly unrelated elements, such as the signal ImageProvider::signalNewFrameReady, QtQuick.Controls imports, and multiple uses of the image provider. The output also doesn't appear to directly correspond to the source provided, based on the messages regarding template_image.png.
Try simplifying it to the minimum required to demonstrate the issue.
-
The initial example combines several possibly unrelated elements, such as the signal ImageProvider::signalNewFrameReady, QtQuick.Controls imports, and multiple uses of the image provider. The output also doesn't appear to directly correspond to the source provided, based on the messages regarding template_image.png.
Try simplifying it to the minimum required to demonstrate the issue.
@jeremy_k Thank you for your advice. I have changed few things, but I don't know if I did it in a right way.