Results 1 to 7 of 7

Thread: how to display window(Window A), when clicked on a button of another window(Window B)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: how to display window(Window A), when clicked on a button of another window(Windo

    The first method should work if the object is created
    Also it is always safe to have a parent to any QObject based object.
    Qt Code:
    1. void window_a::on_pushButton_clicked()
    2. {
    3. window_b * mywindow_b = new window_b(this);
    4. mywindow_b->show();
    5. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by Santosh Reddy; 9th November 2011 at 04:39. Reason: updated contents

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

    aurora (15th November 2011)

Similar Threads

  1. Replies: 2
    Last Post: 17th February 2011, 12:30
  2. Replies: 3
    Last Post: 23rd December 2010, 06:55
  3. Replies: 0
    Last Post: 10th September 2010, 13:23
  4. Replies: 11
    Last Post: 4th June 2008, 07:22
  5. Maximize Window button of Manin Window
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 1st August 2007, 08:20

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.