mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
AdjustingScrollArea: removed event filter
This commit is contained in:
parent
8db22973e9
commit
e0e20d3ae7
|
@ -48,17 +48,3 @@ QSize AdjustingScrollArea::sizeHint() const
|
||||||
|
|
||||||
return QScrollArea::sizeHint();
|
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);
|
|
||||||
}
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ public:
|
||||||
|
|
||||||
virtual void resizeEvent(QResizeEvent *ev) override;
|
virtual void resizeEvent(QResizeEvent *ev) override;
|
||||||
virtual QSize sizeHint() const override;
|
virtual QSize sizeHint() const override;
|
||||||
virtual bool eventFilter(QObject *obj, QEvent *ev) override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ADJUSTINGSCROLLAREA_H
|
#endif // ADJUSTINGSCROLLAREA_H
|
||||||
|
|
Loading…
Reference in New Issue
Block a user