qt - Canvas image not grabbed in QQuickWindow -


i need capture image qml has canvas elements. whereas canvases displayed fine not correctly saved in picture snapshots.

i have used qquickwindow grabwindow method described in solutions of this link , images saved in ui thread called afterrendering signal (i have tried frameswapped signal too). result qml objects saved not canvas objects.

both renderstrategy , rendertargetof canvases set default values. simple canvases shown below:

canvas {     id:canvas      onpaint:{         var ctx = canvas.getcontext('2d');         ctx.beginpath();         ctx.moveto(20, 0);         ctx.beziercurveto(-10, 90, 210, 90, 180, 0);         ctx.stroke();         //...     } } 

i have noticed afterrendering signal called multiple times.

any suggestion appreciated! :)


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -