希望朋友们能指点一下
------解决方案--------------------
A.h
- C/C++ code
#ifndef A_H#define A_H#include <QObject>#include <QDebug>class A : public QObject{ Q_OBJECTpublic: explicit A(QObject *parent = 0) : QObject(parent) { } void sendSignalToB() { emit toB(); }signals: void toB();public slots: void fromB() { qDebug() << "i am A ,Rcv from B."; }};#endif // A_H