Represent svg in tab view
-
Hi,
if the svg item you want to separate are grouped in a "group" and has an id that you know so you can use:@
QFile file_svg (file_str);
if (!file_svg.open(QIODevice::ReadOnly | QIODevice::Text))
return;
svgArray = file_svg.readAll();
file_svg.close();
QSvgRenderer *svgRender;
svgRender = new QSvgRenderer(svgArray);QImage *imageSvg = new QImage(dim, QImage::Format_ARGB32);
....
svgRender->load(svgArray);
QPainter p;
p.begin(imageSvg);
svgRender->render(&p, id);
p.end();....
@where "id" is the id (QString) of the object you want to put in the QPainter.
Next you can show the imageSvg where you want.