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
signalsandslots.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#include "signalsandslots.h"
5
8{
9 if (value != m_value) {
10 m_value = value;
12 }
13}
15
16int main()
17{
19 Counter a, b;
21 QObject::connect(&a, &Counter::valueChanged,
22 &b, &Counter::setValue);
24
26 a.setValue(12); // a.value() == 12, b.value() == 12
28 b.setValue(48); // a.value() == 12, b.value() == 48
30}
void valueChanged(int newValue)
void setValue(int value)
[0]
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Definition qobject.cpp:2960
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
#define emit
int main()
[0]