[Qt-interest] dynamically generated SVG inside a QWebView?

Karol Krizka kkrizka at gmail.com
Sun May 31 12:20:15 CEST 2009


On Fri, May 29, 2009 at 9:28 PM, Paul Miller <paul at fxtech.com> wrote:
> I want to use a QWebView to show some SVG content that is dynamically
> generated from data within my application (a chart).
>
> I see that I can't embed svg directly in my content using <svg>
> elements, but if I embed an <object> element that references SVG data
> that will work. However, the data is coming from a file and I need the
> data to come from code generated on the fly in my application.
>
> Is it possible to wedge in my own data generator so the svg does not
> have to live as a file on disk first?
>
> I'm using Qt 4.5.1.
>
Do you have to use QWebView to show the data? If not, you might want
to take a look at QSvgWidget, which has a function to load the SVG
image from data stored in QByteArray.

--
Cheers,
Karol Krizka



More information about the Qt-interest-old mailing list