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]
7
class
View
:
public
QGraphicsView
8
{
9
Q_OBJECT
10
//...
11
public
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]
View
[2]
Definition
graphicsview_snippet.cpp:8
qtbase
src
widgets
doc
snippets
graphicsview
graphicsview_snippet.cpp
Generated on
for Qt by
1.14.0