Search code examples
qtuser-interfacedesigner

Qt Designer change window on button click


Hi i am new to Qt Designer and i try to make an application which in the first page it has 2 buttons(easy and i have done this) and when i press button1 i want to go to a new window with some other elements but i dont want that window to pop up and end up with the main window and the new one. All i want is to replace the main window with the new one and have only one window and if want to go back press the back push button and return to the previous one. All the solutions that i find are with the method which opens a new window and not replacing the old one.

Thanks


Solution

  • You do not need another window, use QStackedWidget, add a couple of widgets into it, switch it's pages and be happy