Results 1 to 8 of 8

Thread: Show parent window

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Posts
    116
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1

    Default Re: Show parent window

    Qt Code:
    1. MyMainWindow*p=(MyMainWindow*)this->parent();
    To copy to clipboard, switch view to plain text mode 

    In above code ,In place of "MyMainWindow" what should I put?

    in mainwindow .h class is decraled as..

    Qt Code:
    1. class MainWindow : public QMainWindow
    2. {
    3. }
    To copy to clipboard, switch view to plain text mode 


    cant we connect a close event to parent window function???

    I just need to detect the close event of this child window and connect my f_max() function to that signal

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    8
    Thanked 133 Times in 128 Posts

    Default Re: Show parent window

    put MainWindow instead of MyMainWindow and use the closeEvent code i showed u

Similar Threads

  1. Parent window over child
    By neolol in forum Qt Programming
    Replies: 4
    Last Post: 15th May 2009, 21:15
  2. connecting child to parent window...
    By sumit in forum Qt Programming
    Replies: 1
    Last Post: 19th October 2008, 21:28
  3. How to close parent window from child window?
    By montylee in forum Qt Programming
    Replies: 5
    Last Post: 14th October 2008, 11:40
  4. Getting a parent window from a QT/Linux library
    By nicolas44 in forum Qt Programming
    Replies: 8
    Last Post: 31st May 2007, 08:17
  5. move parent window to the front.
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2007, 08:41

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.