I've got a widget that I want to have operate inside its own thread, SWidget. I've got another class called SWidgetThread that inherits QThread. It declares a new SWidget and then fires off exec() inside its run() function so that that thread has its own event loop.

the problem that I'm running into is that I want a TabWidget to have each tab (made up of a SWidget) run in a seperate thread. So I was trying to have my TabWidget create a new SWidgetThread object, and then I ask my SWidgetThread object for a pointer to its SWidget and that is the widget that I give to the TabWidget as its page. But later when I go to get rid of the tab, I get a pointer to the page, but that page's->thread object is the same as the TabWidget's->thread. So when I call quit() on my page, it kills the main thread.

Help?
Paul