示例#1
0
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    sender objSender;
    Reciver objreciver;
    QObject::connect(&objSender,SIGNAL(sigSender()),&objreciver,SLOT(sltReceiver()),Qt::QueuedConnection);
    return a.exec();
}
示例#2
0
int receiver::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: sltReceiver(); break;
        default: ;
        }
        _id -= 1;
    }
    return _id;
}
示例#3
0
void Sender::timer()
{

    connect(this,SIGNAL(sigSender()),obj_recv,SLOT(sltReceiver()),Qt::QueuedConnection);

}