hi friends,
normally using fillRect() we will fill the entire rect with some color ..
but if i want to fill RoundRect .. how can i use fillRect ..
my code
Qt Code:
  1. QRectF rect1(0, 0, 100, 50);
  2. QRectF rect2(5, 5, 90, 40);
  3. painter->setPen(QColor(160, 160, 160));
  4. painter->setBrush(QColor(104, 104, 104));
  5. painter->drawRoundRect(rect1);
  6. painter->drawRoundRect(rect2);
  7. painter->fillRect(7, 7, 86, 36, QColor(51, 51, 51));
To copy to clipboard, switch view to plain text mode 

but it showing a box inside the rect2 . how can i fill the entire rect2 with QColor ...

currently i change my code as
Qt Code:
  1. QRectF rect1(0, 0, 100, 50);
  2. QRectF rect2(5, 5, 90, 40);
  3. painter->setPen(QColor(160, 160, 160));
  4. painter->setBrush(QColor(104, 104, 104));
  5. painter->drawRoundRect(rect1);
  6. painter->setBrush(QColor(51, 51, 51));
  7. painter->drawRoundRect(rect2);
To copy to clipboard, switch view to plain text mode