PDA

View Full Version : QtWebKitBridge, how to assign QPixmap or QImage to HTML5 canvas element?



mound
8th May 2014, 22:09
Hello,

I’m experimenting with QtWebKitBridge

I’ve had success with QPixmap::assignToHTMLImageElement to pull a QPixmap from the Qt app into an HTML <img> tag within my embedded QWebView.

But what I want to do is assign the QPixmap (or a QImage) to an HTML5 canvas element rather than than an <img> tag in order that the HTML5 side can then continue to draw over it.

I don’t see any API named like “assignToHTMLCanvasElement” so what is the proper way to do so?

Thanks