QtExamples/DbSigSlot/main.cpp

20 lines
553 B
C++
Raw Permalink Normal View History

2021-03-25 15:26:30 +08:00
#include <iostream>
#include "object.h"
2021-03-25 15:26:30 +08:00
using namespace std;
// 目的:自行构造 moc 编译器,手动将 object.h --> db_bject.cpp (宏 和 moc 编译器处理的部分)
// 时间2021-003-26
// 作者:偕臧 ifmet.cn
// 下载https://github.com/xmuli/QtExamples
// 参考https://blog.csdn.net/perfectguyipeng/article/details/78082360
2021-03-25 15:26:30 +08:00
int main(int argc, char *argv[])
{
Object *obj1 = new Object();
Object *obj2 = new Object();
2021-03-25 15:26:30 +08:00
Object::db_connet(obj1, "sig1()", obj2, "slot1()");
obj1->testSignal();
2021-03-25 15:26:30 +08:00
return 0;
}