From 95818b078e10b0e04e40bbe4a61d36f4a58eb8d5 Mon Sep 17 00:00:00 2001 From: Atul Date: Tue, 20 Aug 2019 19:42:44 +0200 Subject: [PATCH] cleans up more handlers --- src/cpp/QtWidgets/QMainWindow/nmainwindow.h | 4 ++-- src/cpp/QtWidgets/QWidget/nwidget.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cpp/QtWidgets/QMainWindow/nmainwindow.h b/src/cpp/QtWidgets/QMainWindow/nmainwindow.h index 975e66df8..dbcb5b947 100644 --- a/src/cpp/QtWidgets/QMainWindow/nmainwindow.h +++ b/src/cpp/QtWidgets/QMainWindow/nmainwindow.h @@ -22,11 +22,11 @@ private: } default: ; // do nothing } - return false; + return QMainWindow::eventFilter(object, event); } void resizeEvent(QResizeEvent * event){ calculateLayout(); - QWidget::resizeEvent(event); + QMainWindow::resizeEvent(event); } }; diff --git a/src/cpp/QtWidgets/QWidget/nwidget.h b/src/cpp/QtWidgets/QWidget/nwidget.h index 1187d6152..e1d29cf7b 100644 --- a/src/cpp/QtWidgets/QWidget/nwidget.h +++ b/src/cpp/QtWidgets/QWidget/nwidget.h @@ -11,12 +11,13 @@ class NWidget: public QWidget, public NodeWidget public: using QWidget::QWidget; // https://doc.qt.io/qt-5/stylesheet-reference.html - void paintEvent(QPaintEvent *) + void paintEvent(QPaintEvent *e) { QStyleOption opt; opt.init(this); QPainter p(this); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); + QWidget::paintEvent(e); } };