Solved How to handle a QTimer from another Thread in the MainWindow Class with a Connection and Signal and Slot ->QueuedConnection
-
I thought that it will still took some CPU. But indeed you are right, I just let it run, with nothing to do, because I stopped the qtimer.
I changed that, Thanks :)
-
I get this Error,
ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread edad48. Receiver '' (of type 'HEGSimulator') was created in thread 1bc55888", file kernel\qcoreapplication.cpp, line 541 Invalid parameter passed to C runtime function. Invalid parameter passed to C runtime function.
just in Debug Mode and exactly when I want to
delete hegDevice;
in which the Thread was running.
My solution for that is:
connect(simulatorThread,SIGNAL(finished()),hegDevice,SLOT(deleteLater()));
and no
delete hegDevice
in the Destructor anymore