Why Is QPainter Not Painting All Objects

  • 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);
    rect2 = QRect(400, 280, 180, 30);


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.