Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How can i know which signal come first among three signal?
Yash001 last edited by
My software is connected with hardware. Hardware send three different signal through USB. I captures that signal into software.
How can I identify, which signal come first on software side?
I have three slot for three signal. One slot per each signal.
Qt has any class, which is give the information about signal order? or any C++ design pattern, which I can use to identify the signal order?
That three signal some many time from hardware. I wanted to find the order when it is come first time only.
How are you getting these hardware signals to your application ?
Dariusz last edited by
You could record time when you receive signal and then add it to some treeView & sort it by time?
VRonin last edited by VRonin
Are you using multiple threads?
If the answer is no then the order of execution of the slots is guaranteed to be the order of emission of the signal.*
If multiple slots are connected to the same signal they will executed in the order they were connected**
'* http://doc.qt.io/qt-5/qt.html#ConnectionType-enum direct connection is equivalent to a call direct call to the slot, even if you force the queued connection signals invoke
QCoreApplication::postEventwhich is a FIFO queue
JonB last edited by
I'm sure your two statements are true, but since they are pretty significant can you provide documentation links for each of them (especially the first), please?