treeland/examples/test_pinch_handler/eventitem.h

21 lines
449 B
C
Raw Permalink Normal View History

// Copyright (C) 2024 groveer <guoyao@uniontech.com>.
// SPDX-License-Identifier: Apache-2.0 OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include <QQuickItem>
class Q_DECL_HIDDEN EventItem : public QQuickItem
{
Q_OBJECT
QML_NAMED_ELEMENT(EventItem)
public:
explicit EventItem(QQuickItem *parent = nullptr);
2024-10-22 11:20:42 +08:00
inline bool isValid() const
{
return parent();
}
private:
bool event(QEvent *event) override;
};