Results 1 to 17 of 17

Thread: Creating a QTcpSocket or a QTcpServer in a thread other than the main thread.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Posts
    9
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question Creating a QTcpSocket or a QTcpServer in a thread other than the main thread.

    I have discovered that QTcpSocket and QTcpServer has to be created in main thread in order to function properly. Created in other thread results in slots not being called. Unfortunately, my part was just writing a dll which does not know which thread is creating the class. Furthermore, running the class creation in main thread should not be a requirement. Is there a way to run them reliable in other threads? I have no ground to run network activities in a UI thread.

    Many Thanks!
    Last edited by jan; 29th September 2009 at 08:44. Reason: spelling error

Similar Threads

  1. Replies: 6
    Last Post: 29th April 2009, 18:17
  2. QTcpSocket, QTcpServer problem
    By frido in forum Qt Programming
    Replies: 3
    Last Post: 3rd April 2009, 23:16
  3. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  4. Replies: 10
    Last Post: 20th March 2007, 22:19
  5. Main Thread (GUI Thread)
    By ^NyAw^ in forum Qt Programming
    Replies: 1
    Last Post: 18th November 2006, 16:07

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.