Results 1 to 7 of 7

Thread: my SLOT not part of QThread

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: my SLOT not part of QThread

    Quote Originally Posted by freak
    Now i have a problem where the SLOT code is never executed.
    Do you start the event loop in that new thread (i.e. do you invoke QThread::exec() in run() )?

  2. #2
    Join Date
    Feb 2006
    Posts
    25
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    5

    Default Re: my SLOT not part of QThread

    I do call exec() inside run.

    How do you make a connection explicitly?

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: my SLOT not part of QThread

    Quote Originally Posted by freak
    How do you make a connection explicitly?
    Qt Code:
    1. connect( tcpServer, SIGNAL( newConnection() ),
    2. this, SLOT( processpacket() ),
    3. Qt::DirectConnection );
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. QThread help please
    By munna in forum Newbie
    Replies: 14
    Last Post: 31st May 2006, 05:54
  2. Replies: 2
    Last Post: 4th May 2006, 20:17
  3. Is it possible to create a QThread without inheriting ?
    By probine in forum Qt Programming
    Replies: 6
    Last Post: 23rd March 2006, 23:51
  4. SLOT and QPushButton
    By mickey in forum Qt Programming
    Replies: 15
    Last Post: 15th February 2006, 07:46
  5. signal slot conection using a string, not a SLOT
    By rianquinn in forum Qt Programming
    Replies: 6
    Last Post: 5th February 2006, 19:52

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
  •  
Qt is a trademark of The Qt Company.