[Interest] Crazy idea of the day: QML Image source inception

Jason H jhihn at gmx.com
Thu Oct 20 15:55:05 CEST 2016


I have a collection of QML elements that use the canvas. I'd like to be able to re-use them as an Image source. 

For example, one of my QMLs is X.qml, which draws two intersecting diagonal lines using Canvas. I also have a ListView who has a delegate that contains an image. Sometimes I want this to be a typical image (PNG, JPG, SVG) but occasionally I'd like to be able to use a QML.  I realize I can do some generation and write an image provider and jump through all those hoops, but something like this should be built in? It may also be possible to do some createComponent wizardry, and use two elements. But it remains that 
Image {
    source: "X.qml"
}

would be very cool indeed. 





More information about the Interest mailing list