Ok,
this is a piece of my first header:
A.h
#ifndef A_H
#define A_H
#include <QTcpServer>
#include <QTcpSocket>
class B;
{
.. .. ..
};
#endif
A.h
#ifndef A_H
#define A_H
#include <QTcpServer>
#include <QTcpSocket>
class B;
class A: public QObject
{
.. .. ..
};
#endif
To copy to clipboard, switch view to plain text mode
and the implementation is:
A.cpp
#include "A.h"
#include <QtNetwork>
#include "B.h"
..
..
..
A.cpp
#include "A.h"
#include <QtNetwork>
#include "B.h"
..
..
..
To copy to clipboard, switch view to plain text mode
Where B is:
B.h
#ifndef B
#define B
#include "HostInfo.h"
{
Q_OBJECT
B.h
#ifndef B
#define B
#include "HostInfo.h"
class B : public QObject
{
Q_OBJECT
To copy to clipboard, switch view to plain text mode
the implementation is
#include "B.h"
..
..
..
#include "B.h"
..
..
..
To copy to clipboard, switch view to plain text mode
while the class HostInfo is:
#ifndef HOSTINFO_H
#define HOSTINFO_H
#include "QTcpSocket"
typedef struct Host{
}HostInfo;
#endif
#ifndef HOSTINFO_H
#define HOSTINFO_H
#include "QTcpSocket"
typedef struct Host{
QTcpSocket* pxSocket;
}HostInfo;
#endif
To copy to clipboard, switch view to plain text mode
Thanks
Bookmarks