Results 1 to 2 of 2

Thread: Set a window as child at runtime

  1. #1
    Join Date
    Jul 2007
    Posts
    166
    Thanks
    25
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Set a window as child at runtime

    Hi,
    In my program, When I load the program, first I open a window and read some values from that window ( default values) as close that window and load the main window. After that I load another window from that main window. I need to load the first window ( which one I load first time ) from the new window as the child window of the new one. I can show that window using show(). But it is not the child winodw. How can I set the first window, which one is closed now, as the child window of the current window?
    Please help me....

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Set a window as child at runtime

    Use QWidget::setParent() to reparent the window to the newly opened one.

Similar Threads

  1. Replies: 3
    Last Post: 23rd November 2007, 12:40
  2. Change shape of window / animate window
    By sabeesh in forum Qt Programming
    Replies: 3
    Last Post: 31st October 2007, 09:16
  3. move parent window to the front.
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2007, 09:41
  4. Replies: 5
    Last Post: 5th August 2006, 00:44
  5. how to distroy child window which parents is zero
    By rajesh in forum Qt Programming
    Replies: 4
    Last Post: 22nd June 2006, 09: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.