[Interest] Qt 5.10 QMetaObject::invokeMethod + lambda

Philippe philwave at gmail.com
Sun Dec 24 11:51:02 CET 2017


With the nice new Qt 5.10 support for QMetaObject::invokeMethod + lambda
is there any reason to use or prefer the "old" way:

QTimer::singleShot(0, receiver, someLambda);

over the new:

QMetaObject::invokeMethod(receiver, someLambda, Qt::QueuedConnection);

Tracing quickly the code, QTimer::singleShot seems to be more heavy.

Philippe




More information about the Interest mailing list