Graphics View
-
This code is to match a text int in a block and draw a rectangle at a given position. That is working correctly for one variable but i want when two variables are there in a program then two rectangles will draw.
For Example :
int a,b;
then i want two rectangles will appear (one rectangle for variable a and another for variable b) in graphics view
Can someone help me?if(cursor.block().text().contains("int",Qt::CaseInsensitive))
{
scene.addRect(100,0,90,90,QPen(Qt::black),QBrush(Qt::darkBlue));
ui->graphicsView->setScene(&scene);}