Il 16/03/2016 17:24, charleyb123 . ha scritto:
Current slot implementation bridges runtime-reflection capabilities (provided by QMetaObject), and provides the thread-safe event queue that bridges "slot-execution" to occur on the "target-thread" for which the "target-QObject" has "affinity". Lambdas alone cannot do this -- some kid of "event-queue" would be required that is "thread-aware" (yes, could be provided through a library of some kind, that happens to be what Qt is doing).
This thread wasn't talking about lambdas, rather about the "old" connect syntax (SIGNAL/SLOT based) vs the "new" one (PMF based).
Anyhow, since you brought lambdas into discussion, you can pass an affinity object for them as well:
https://doc.qt.io/qt-5/qobject.html#connect-5
Cheers, -- Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908 KDAB - The Qt Experts
smime.p7s
Description: Firma crittografica S/MIME
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest