假设我有这个信号:
signals:
void progressNotification(int progress);
我只是最近才了解 Qt 中的稿件关键字。到目前为止,我一直通过像调用常规函数一样调用它们来执行信号。所以不是:
emit progressNotification(1000 * seconds);
我会写:
progressNotification(1000 * seconds);
Calling them like that seemed to work, and all the connected slots would execute, so does using the emit keyword cause a different behaviour, or is it just syntactic sugar?