...
this->paint_area->installEventFilter(this);
...
bool MainWindow::eventFilter(QObject *target, QEvent *event) {
if (target == this->paint_area) {
if (event->type() == QEvent::Paint) {
this->paintSmth((QPaintEvent*)event);
return true;
}
}
return false;
}