Am 20.07.2012, 16:38 Uhr, schrieb Jan Kundrát <[email protected]>:
Thanks, that's it. I like the QMetaObject::invokeMethod bit -- I though
one had to use QTimer::singleShot )and an explicit slot due to the
arguments) for that.
QTimer::singleShot(0, qobject, SLOT(doSome())); is in fact just a wrapper
around the metaobject invocation (special cased "0") and invokeMethod is
what happens all the time when you connect(this, SIGNAL, that, SLOT)
QueuedConnection comes *very* handy to break out of the event queue.
Also it's not really necessary to have invokables as slots - signing them
Q_INVOKABLE is sufficient.
Cheers,
Thomas