Database BLOB to Image in Qml
Solved
QML and Qt Quick
-
So I have an SQL Database which contains an Picture stored as a BLOB.
What is the easiest way to show it in an Image in QML ?
I already can expose the data to QML as QByteArray but how to load that in an Image?
-
Hi,
What about a custom image provider ?
-
I followed the instructions in the link you provided and it worked well.
I just don't understand how you would came up with passing
"data:image/png;base64,"
to Image. I think that should be in the docs of Image.
-
That is the way to fully embed an image in a web page without the need for a remote file but it makes the size of the data at least twice as big.