Results 1 to 1 of 1

Thread: Navigation between 3 (or more) window ?

  1. #1
    Join Date
    Mar 2015
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Navigation between 3 (or more) window ?

    Hello,

    I have a problem to navigate between 3 or more windows.

    I have a mainwindow, a window_1 and a window_2.
    On each window i have a button to open a new window and hide the actual one, and a button to close the window and access to the previous one.

    My problem is when I am on the window_2 and i want to close it, when the program close the actual window and try to access to the previous one, it show me the 2 others ones and crash.

    Here is my code to open and close :
    Qt Code:
    1. void window_1::_pushButton_open_clicked()
    2. {
    3. this->hide();
    4. window_2 *w = new window_2();
    5. w->exec();
    6. this->show();
    7. }
    8.  
    9. void window_2::_pushButton_close_clicked()
    10. {
    11. this->close();
    12. }
    To copy to clipboard, switch view to plain text mode 
    I think my problem come to "this->close" and "this->show()" which is dont take mu previous window.

    Thanks for your help, i hope that clear enough.
    Last edited by djeff77; 25th March 2015 at 15:02.

Similar Threads

  1. Control Tab Navigation
    By sterling in forum Qt Programming
    Replies: 1
    Last Post: 20th August 2014, 08:38
  2. Qt Window navigation
    By jbarrena in forum Newbie
    Replies: 3
    Last Post: 30th March 2014, 11:56
  3. Replies: 1
    Last Post: 21st February 2012, 09:30
  4. Replies: 3
    Last Post: 4th November 2011, 09:38
  5. Navigation purpose
    By jerkymotion in forum Qt Programming
    Replies: 6
    Last Post: 17th March 2011, 17:59

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.