In a nutshell... my question is: How do you set up the signals and slots of objects that go on different threads?

I have a function that has to run over and over seperate from my main GUI application (A joystick polling function).

When it comes to connecting the signals and slots of my joystick reader to my main GUI, would I do something like this?
Qt Code:
  1. class JoystickPoller : public QThread
  2. {
  3. /* implement all QThread functions here,
  4.   set up some custom signals as well */
  5. }
To copy to clipboard, switch view to plain text mode 

And then in my main GUI do something like this?

Qt Code:
  1. JoystickPoller* poller = new JoystickPoller();
  2. connect( poller, SIGNAL( NewJoystickInfo( JoystickData ) ),
  3. this, SLOT( HandleNewJoyStickInfo( JoystickData ) ) );
To copy to clipboard, switch view to plain text mode 

Would that be how you set up 2 threads to safely signal and slot with each other?

Thanks in advance to anyone who answers.

And I know Mr. Wysota's always on it! Thank you Wysota. You've answered like 80 of my questions now!