From e0e20d3ae7aef6a646c94d274c0f30a3b193d7d9 Mon Sep 17 00:00:00 2001 From: krepa098 Date: Wed, 1 Oct 2014 17:22:51 +0200 Subject: [PATCH] AdjustingScrollArea: removed event filter --- widget/adjustingscrollarea.cpp | 14 -------------- widget/adjustingscrollarea.h | 1 - 2 files changed, 15 deletions(-) diff --git a/widget/adjustingscrollarea.cpp b/widget/adjustingscrollarea.cpp index 04b735ed1..29315ba8b 100644 --- a/widget/adjustingscrollarea.cpp +++ b/widget/adjustingscrollarea.cpp @@ -48,17 +48,3 @@ QSize AdjustingScrollArea::sizeHint() const return QScrollArea::sizeHint(); } - -bool AdjustingScrollArea::eventFilter(QObject *obj, QEvent *ev) -{ - if (ev->type() == QEvent::Paint) - { - // workaround: sometimes a child widget gets drawn on top of the scrollbar - // so we trigger a repaint afterwards - // => Actually, we don't. This triggers an infinite loop of QEvent::UpdateRequest and burns 100% CPU ! - //verticalScrollBar()->update(); - //horizontalScrollBar()->update(); - } - - return QObject::eventFilter(obj, ev); -} diff --git a/widget/adjustingscrollarea.h b/widget/adjustingscrollarea.h index 380ac5df8..584e4e875 100644 --- a/widget/adjustingscrollarea.h +++ b/widget/adjustingscrollarea.h @@ -27,7 +27,6 @@ public: virtual void resizeEvent(QResizeEvent *ev) override; virtual QSize sizeHint() const override; - virtual bool eventFilter(QObject *obj, QEvent *ev) override; }; #endif // ADJUSTINGSCROLLAREA_H