3 ms·
wxWidgets has QueueEvent and ProcessEvent and AddPendingEvent for this sort of thing - does Qt force you to emit a signal without being able to queue it first?
by 72deluxe 12y ago
wxWidgets has QueueEvent and ProcessEvent and AddPendingEvent for this sort of thing - does Qt force you to emit a signal without being able to queue it first?
- ehvatum 12y agoQt offers both signals/slots and a lower level (but still cross platform) event system with the usual post event (async) and send event (blocking) methods. Signals/slots provide a connection abstraction on top of events, and blocking vs queued behavior is a per-connection attribute. So, in cases where the emitter wants to control blocking vs async behavior, you might use the event system with post or send directly.
- guruz 12y agoYou can either use a timer with 0-timeout or http://qt-project.org/doc/qt-5/qmetaobject.html#invokeMethod http://qt-project.org/doc/qt-5/qmetaobject.html#invokeMethod with QueuedConnection. Example: http://code.woboq.org/qt5/qtbase/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp.html#578 http://code.woboq.org/qt5/qtbase/tests/auto/corelib/kernel/q...