Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. India
  4. Graphics View
Forum Updated to NodeBB v4.3 + New Features

Graphics View

Scheduled Pinned Locked Moved India
1 Posts 1 Posters 904 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    parulkalra14
    wrote on last edited by
    #1

    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);

    }

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved