Results 1 to 5 of 5

Thread: Architecture to eliminate "children and parent that is in a different thread"

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,233
    Thanks
    303
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Architecture to eliminate "children and parent that is in a different thread"

    Can this problem be resolved?
    Instead of creating your QSslSocket instance in the MySslClient constructor, create it in the same thread where you create the MySslClient instance and pass the pointer in as an additional argument to the MySslClient constructor. Basically, any QObjects that have a parent-child relationship all must be created in the same thread. So any children of MySslClient have to be created in the same thread where the MySslClient instance (and its parent QObject) are created.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  2. The following user says thank you to d_stranz for this useful post:

    CPPProger (18th June 2020)

Similar Threads

  1. Replies: 0
    Last Post: 16th June 2011, 21:48
  2. "new" + "delete" a QWidget and its children
    By vkincaid in forum Qt Programming
    Replies: 2
    Last Post: 19th January 2010, 21:51
  3. Replies: 2
    Last Post: 7th September 2009, 21:13
  4. Replies: 6
    Last Post: 8th July 2009, 13:24
  5. Replies: 5
    Last Post: 19th April 2009, 13:24

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.