Details
-
Suggestion
-
Resolution: Unresolved
-
P4: Low
-
4.7.4
-
None
-
Mac but doesn't matter
Description
Although the documentation clearly mentions that the source-property of an QML image element is an URL, I am expecting to be able to do this:
I have a c++ model that gets exposed to a qml context. It has an image property:
Q_PROPERTY (QImage background READ background)
This property changes over time and it might be generated inside my application, so there is neither a public URL on the internet nor a local file on the filesystem.
Now I want to display that image in a QML scene like this:
Image
{ fillMode: Image.Tile source: model.background }qrc:/resources/main.qml:8: Unable to assign QImage to QUrl
which is a correct conclusion but anyway I want to do this. I have seen other bug reports that seem to go into the same direction(using application generated images in qml) but involve custom image loaders etc. I don't see why this would be necessary and I am voting for such a simple solution like proposed above.