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
5
class
View
:
public
QGraphicsView
6
{
7
Q_OBJECT
8
...
9
public
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
};
QGraphicsView
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
Definition
qgraphicsview.h:24
QGraphicsView::rotate
void rotate(qreal angle)
Rotates the current view transformation angle degrees clockwise.
Definition
qgraphicsview.cpp:1822
View
[2]
Definition
graphicsview_snippet.cpp:6
View::zoomOut
void zoomOut()
Definition
graphicsview_snippet.cpp:11
View::zoomIn
void zoomIn()
Definition
graphicsview_snippet.cpp:10
View::rotateLeft
void rotateLeft()
Definition
graphicsview_snippet.cpp:12
View::rotateRight
void rotateRight()
Definition
graphicsview_snippet.cpp:13
scale
GLenum GLenum GLenum GLenum GLenum scale
Definition
qopenglext.h:10817
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:119
slots
#define slots
Definition
qtmetamacros.h:40
qtbase
src
widgets
doc
snippets
graphicsview
graphicsview_snippet.cpp
Generated by
1.10.0