Results 1 to 4 of 4

Thread: Passing a child from a QThread to a QMainWindow

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Posts
    4
    Thanks
    2

    Default Re: Passing a child from a QThread to a QMainWindow

    Quote Originally Posted by wysota View Post
    Create the object without the parent, then move it to a proper thread and then set a parent on it if you want to.
    I'm sorry, how do I create the object without a parent?

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 370 Times in 336 Posts

    Default Re: Passing a child from a QThread to a QMainWindow

    don't pass it into an object's ctor.
    Qt Code:
    1. ...
    2. MyObject *mo = new MyObject();
    3. ...
    To copy to clipboard, switch view to plain text mode 
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. QMainWindow as a child of QMainWindow
    By Elder Orb in forum Qt Programming
    Replies: 8
    Last Post: 12th February 2011, 21:31
  2. Replies: 3
    Last Post: 12th August 2008, 19:14
  3. QMainWindow child of a QDialog
    By brevleq in forum Qt Programming
    Replies: 2
    Last Post: 16th January 2008, 07:16
  4. Replies: 2
    Last Post: 27th March 2007, 12:09
  5. Showing QMainWindow without showing a child QWidget
    By discostu in forum Qt Programming
    Replies: 3
    Last Post: 4th March 2007, 09:03

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.