Results 1 to 10 of 10

Thread: how to create window that opened when close main window??

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Join Date
    May 2010
    Posts
    20
    Thanks
    7
    Qt products
    Qt4

    Default Re: how to create window that opened when close main window??

    Quote Originally Posted by Zlatomir View Post
    Do you need something like this?
    Qt Code:
    1. #include <QtGui>
    2. int main (int argc, char** argv) {
    3. QApplication ap(argc, argv);
    4.  
    5. QWidget *window1 = new QWidget(0);
    6. QWidget *window2 = new QWidget(0);
    7.  
    8. QPushButton *button = new QPushButton("Open second Window", window1);
    9.  
    10. window1->show();
    11.  
    12. QObject::connect(button, SIGNAL(clicked()), window2, SLOT(show()));
    13.  
    14. return ap.exec();
    15. }
    To copy to clipboard, switch view to plain text mode 
    yes yes like this...
    thanks a lot
    thanks a lot Zlatomir

    i will try to do that in my application
    and try to add menu and a lot of things in second window

    i am grateful for you..
    Last edited by Abeer; 16th May 2010 at 15:12.

Similar Threads

  1. Replies: 1
    Last Post: 19th April 2010, 07:19
  2. close window signal
    By jano_alex_es in forum Newbie
    Replies: 5
    Last Post: 22nd May 2009, 10:10
  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. Replies: 11
    Last Post: 11th August 2008, 09:14
  5. Replies: 15
    Last Post: 23rd March 2007, 16:16

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
  •  
Qt is a trademark of The Qt Company.