diff options
Diffstat (limited to 'tests/manual/examples/widgets/touch/pinchzoom/graphicsview.h')
-rw-r--r-- | tests/manual/examples/widgets/touch/pinchzoom/graphicsview.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/manual/examples/widgets/touch/pinchzoom/graphicsview.h b/tests/manual/examples/widgets/touch/pinchzoom/graphicsview.h new file mode 100644 index 0000000000..e6a300f418 --- /dev/null +++ b/tests/manual/examples/widgets/touch/pinchzoom/graphicsview.h @@ -0,0 +1,18 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +#pragma once +#include <QGraphicsView> + +class GraphicsView : public QGraphicsView +{ + Q_OBJECT + +public: + GraphicsView(QGraphicsScene *scene = nullptr, QWidget *parent = nullptr); + + bool viewportEvent(QEvent *event) override; + +private: + qreal totalScaleFactor = 1; +}; |