summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/snippets/code/src_gui_widgets_qabstractspinbox.cpp
blob: bb5badea384c0aee812fa3b4da05ecd6972e3e49 (plain)
1
2
3
4
5
6
7
8
9
10
11
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

//! [0]
QSpinBox *spinBox = new QSpinBox(this);
spinBox->setRange(0, 100);
spinBox->setWrapping(true);
spinBox->setValue(100);
spinBox->stepBy(1);
// value is 0
//! [0]