I have an exisiting Graph displayed as QWidget which I can already save to a bitmap using grab():
QPixmap image = grab();
Is there a Possibility to save that widget also to .svg?
Thanks!
QSvgGenerator generator;
generator.setFileName(path);
generator.setSize(widget->size());
generator.setViewBox(widget->rect());
generator.setTitle(tr("Your title"));
generator.setDescription(tr("some desscription"));
widget->render(&generator);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With