Hi,
I'm a little bit confused about the usage of
QTimer::singleShot(0,
this,
SLOT(doSomething
()));
QTimer::singleShot(0, this, SLOT(doSomething()));
To copy to clipboard, switch view to plain text mode
The document states that "a QTimer with a timeout of 0 will time out as soon as all the events in the window system's event queue have been processed". So does this mean that it is essentially the same as
QMetaObject::invokeMethod(this,
"doSomething", Qt
::QueuedConnection);
QMetaObject::invokeMethod(this, "doSomething", Qt::QueuedConnection);
To copy to clipboard, switch view to plain text mode
or does it mean that in the case of an currently empty event queue the slot will be called directly?
Bookmarks