blob: 6a877de7e3b7533e934143bc01a647e5c63b2835 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "calculatorform.h"
#include <QWidget>
//! [0]
CalculatorForm::CalculatorForm(QWidget *parent)
: QWidget(parent)
{
setupUi(this);
}
//! [0]
//! [1]
void CalculatorForm::on_inputSpinBox1_valueChanged(int value)
{
outputWidget->setText(QString::number(value + inputSpinBox2->value()));
}
//! [1]
//! [2]
void CalculatorForm::on_inputSpinBox2_valueChanged(int value)
{
outputWidget->setText(QString::number(value + inputSpinBox1->value()));
}
//! [2]
|