Why Is QPainter Not Painting All Objects
General and Desktop
1
Posts
1
Posters
431
Views
1
Watching
-
Can someone please tell me why rec1 does not get painted in the example below?
@
void MainWindow::paintEvent(QPaintEvent *event)
{
QPainter painter(this);
QRect rect1;
QRect rect2;rect1 = QRect(500, 560, 280, 30); painter.drawRect(rect1); rect2 = QRect(400, 280, 180, 30); painter.drawRect(rect2);}@