Qt 5.10 Book Examples
chapter60
QMLCPPConnect
CppConnection.h
Go to the documentation of this file.
1
// ======================================================================
2
// CppConnection.h
3
// ======================================================================
4
// This file is a part of the book
5
// "Qt 5.10 Professional programming with C++"
6
// http://qt-book.com
7
// ======================================================================
8
// Copyright (c) 2017 by Max Schlee
9
// ======================================================================
10
11
#pragma once
12
#include <QtCore>
13
14
// ======================================================================
15
class
CppConnection
:
public
QObject {
16
Q_OBJECT
17
public
:
18
CppConnection
(QObject* pobj = 0)
19
: QObject(pobj)
20
{
21
}
22
23
public
slots:
24
void
slotQuit
()
25
{
26
qApp->quit();
27
}
28
29
void
slotInfo
(
const
QString& str)
30
{
31
qDebug() << str;
32
}
33
};
34
CppConnection
Definition:
CppConnection.h:15
CppConnection::CppConnection
CppConnection(QObject *pobj=0)
Definition:
CppConnection.h:18
CppConnection::slotInfo
void slotInfo(const QString &str)
Definition:
CppConnection.h:29
CppConnection::slotQuit
void slotQuit()
Definition:
CppConnection.h:24
Generated by
1.8.14