This doesn't work:

Qt Code:
  1. Thread thread;
  2. connect(&thread, SIGNAL(counterValueChanged(int)), ...);
  3. thread.start();
  4. thread.moveObjectsToThread();
To copy to clipboard, switch view to plain text mode 

No signals emiited at all and iwarning in console is:
QThread: Destroyed while thread is still running
But this works fine:
Qt Code:
  1. Thread *thread;
  2. connect(thread, SIGNAL(counterValueChanged(int)), ...);
  3. thread->start();
  4. thread->moveObjectsToThread();
To copy to clipboard, switch view to plain text mode 

Thread is created and started in main window constructor. In the first case - QThread object is destroyed without stopping thread. So, the thread works, but without any control ("Ping" commands are printed as weel). Why?