Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
graphicsview_snippet.cpp
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#include <QGraphicsView>
5
6//! [2]
7class View : public QGraphicsView
8{
10 //...
11public slots:
12 void zoomIn() { scale(1.2, 1.2); }
13 void zoomOut() { scale(1 / 1.2, 1 / 1.2); }
14 void rotateLeft() { rotate(-10); }
15 void rotateRight() { rotate(10); }
16 //...
17};
18//! [2]