Здравствуйте. Вот код:Код:#include #include class MySignal : public QObject{ Q_OBJECT public: void sendSignal(); signals: void mySignal();};class MySlot : public QObject{ Q_OBJECT public slots: void mySlot();};int main(int argc, char *argv[]){ QCoreApplication a(argc, argv); MySignal mySig; MySlot mySl; mySig.sendSignal(); QObject::connect(&mySig,SIGNAL(mySignal( )),&mySl,SLOT(mySlot())); return a.exec();}void MySignal::sendSignal(){ emit mySignal();}void MySlot::mySlot(){ qDebug()
|