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
painter
->setPen
(QColor(160,
160,
160));
painter
->setBrush
(QColor(104,
104,
104));
painter->drawRoundRect(rect1);
painter->drawRoundRect(rect2);
painter
->fillRect
(7,
7,
86,
36,
QColor(51,
51,
51));
QRectF rect1(0, 0, 100, 50);
QRectF rect2(5, 5, 90, 40);
painter->setPen(QColor(160, 160, 160));
painter->setBrush(QColor(104, 104, 104));
painter->drawRoundRect(rect1);
painter->drawRoundRect(rect2);
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
painter
->setPen
(QColor(160,
160,
160));
painter
->setBrush
(QColor(104,
104,
104));
painter->drawRoundRect(rect1);
painter
->setBrush
(QColor(51,
51,
51));
painter->drawRoundRect(rect2);
QRectF rect1(0, 0, 100, 50);
QRectF rect2(5, 5, 90, 40);
painter->setPen(QColor(160, 160, 160));
painter->setBrush(QColor(104, 104, 104));
painter->drawRoundRect(rect1);
painter->setBrush(QColor(51, 51, 51));
painter->drawRoundRect(rect2);
To copy to clipboard, switch view to plain text mode
Bookmarks