標簽:stat protect style 添加 log cal class hang conn
class globalCalcThread;extern globalCalcThread *g_calcThread;class globalCalcThread : public QThread{ Q_OBJECTpublic: globalCalcThread(); ~globalCalcThread(); //添加一個靜態(tài)函數(shù),讓外部函數(shù)調(diào)用 static void change(); void emitSignal();protected: void run(); signals: void onChange();};globalCalcThread *g_calcThread = new globalCalcThread;void globalCalcThread::change(){ g_calcThread->emitSignal();}void globalCalcThread::emitSignal(){ emit this->onChange();}connect(g_calcThread,SIGNAL(onChange()),this,SLOT(sl_Change()));在外部調(diào)用change()靜態(tài)成員函數(shù)就可以發(fā)射信號了
轉(zhuǎn)自:https://blog.csdn.net/u011962883/article/details/78490441
關(guān)于Qt 靜態(tài)成員函數(shù)調(diào)用信號
標簽:stat protect style 添加 log cal class hang conn
原文:https://www.cnblogs.com/liushui-sky/p/10955398.html
聯(lián)系客服