I'm new to QT and I'm trying to display only the text items of an SVG file but it only works with the rectangle items. I use QSvgRenderer and the method setElementId of the class QGraphicsSvgItem. Does anyone know how to manipulate only text items with their id?
item = new QGraphicsSvgItem(QString( "SVG_Logo.svg"));
renderer = new QSvgRenderer(QLatin1String("SVG Logo Highlights.svg"));
total = new QGraphicsSvgItem();
bool exist_rect = renderer->elementExists(QString("rect1055"));
bool valid = renderer->isValid();
std::cout<<"exist_rect:"<<exist_rect<<std::endl;
std::cout<<"valid:"<<valid<<std::endl;
total->setSharedRenderer(renderer);
/* Work with rectangle but not text !!*/
total->setElementId(QLatin1String("rect1055"));