What you have will not work because you are posting an event to QThread object which does not live in the thread it represents. Instead your thread should have some QObject which you can post events to.
E.g.
Qt Code:
thread->start(); // implies exec() DownloadHandler *handler = new DownloadHandler; // your object handler->moveToThread(thread);To copy to clipboard, switch view to plain text mode
You can also use signals and slots, if you want.
Bookmarks