improved split header menu button

This commit is contained in:
fourtf
2018-08-07 09:38:18 +02:00
parent f34063213c
commit 5df231f072
5 changed files with 92 additions and 34 deletions
+24
View File
@@ -0,0 +1,24 @@
#pragma once
#include <QEvent>
#include <QObject>
#include <functional>
namespace chatterino {
class FunctionEventFilter : public QObject
{
Q_OBJECT
public:
FunctionEventFilter(QObject *parent,
std::function<bool(QObject *, QEvent *)> function);
protected:
bool eventFilter(QObject *watched, QEvent *event) override;
private:
std::function<bool(QObject *, QEvent *)> function_;
};
} // namespace chatterino