Results 1 to 2 of 2

Thread: slot in worker thread is not called

  1. #1
    Join Date
    Jun 2012
    Posts
    63
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default slot in worker thread is not called

    Sample program can be downloaded here which describes the problem. Desperately needing help

    thr_test.zip

    Problem is that signal sent from dialog is not getting called in worker thread.

    I'm having a worker thread created from mainwindow and a dialog. Dialog is connected to worker thread signal and it works OK. Then I also have to send signals from dialog to workerthread but that is not working. I've read that qthread creates its own event loop in default run().

    I know it has to do something with event loops but I don't know what. Please help!

  2. #2
    Join Date
    Jun 2012
    Posts
    63
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: slot in worker thread is not called

    Ok, so I subclassed worker thread and now it works. I guest when QThread slot 'started' is called run() is not yet being called thus EventLoop is not active

Similar Threads

  1. Slot not getting called, Qt::ConnectionType, Thread
    By StarShaper in forum Qt Programming
    Replies: 3
    Last Post: 7th February 2012, 14:04
  2. Replies: 3
    Last Post: 20th September 2011, 20:13
  3. Worker thread
    By doggrant in forum Newbie
    Replies: 4
    Last Post: 3rd November 2009, 15:49
  4. Worker thread problem
    By hkvm in forum Qt Programming
    Replies: 4
    Last Post: 6th September 2009, 20:12
  5. Main thread - worker thread communication.
    By kikapu in forum Newbie
    Replies: 25
    Last Post: 23rd May 2007, 22:09

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.