Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
5class View : public QGraphicsView
6{
8 ...
9public slots:
10 void zoomIn() { scale(1.2, 1.2); }
11 void zoomOut() { scale(1 / 1.2, 1 / 1.2); }
12 void rotateLeft() { rotate(-10); }
13 void rotateRight() { rotate(10); }
14 ...
15};
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
void rotate(qreal angle)
Rotates the current view transformation angle degrees clockwise.
GLenum GLenum GLenum GLenum GLenum scale
#define Q_OBJECT
#define slots