What is the timer's purpose?
start() and stop() are slots so the can be called through a cross-thread signal/slot connection.
In such cases it is almost always possible to create a simple project that shows the same behavior.
Cheers,
_
What is the timer's purpose?
start() and stop() are slots so the can be called through a cross-thread signal/slot connection.
In such cases it is almost always possible to create a simple project that shows the same behavior.
Cheers,
_
the purpose of timer is to timeout when no signal arrives in my serial port. this timer is started within the class it is created in. but when i access the class from the thread, it shows the timer error i mentioned above. I don't access the timer directly from the thread, a function in that class does.
And the data is read by the thread?
Wouldn't it be better to run the timer in the same thread and either signal data arrival or timeout?
I.e. encapsulate all in your data handler class?
Alternatively you can run the timer in the receiver thread (probably your main thread) and just reset it in the slot that handles the data signal from your I/O thread.
The methods are clearly executed by the other thread, hence the error.
Cheers,
_
Bookmarks