How to create multi windows Qt project
-
Hi everyone,
My question is :
How we can create project on Qt in order to have different windows show like this example://program start by main.cpp First_window.show() //configuration window for example do something... First_window.close() Second_window.show() //this is the main window do something Second_window.close() //program finish
I know this is possible to do that with Hide() and show() but this technique not convince me because 2 process running in the same time and this is not optimize . Imagine we have more windows, this is just not viable..
So exist a good solution to do that ? like a good practice
Thank you
-
@martial123 said in How to create multi windows Qt project:
because 2 process running in the same time
Just a note: there are no two processes at the same time.
You can do it like this: show your first window. When it finished with it's work it can create the second window show it and close itself.
-
How you do that ?
in main.cpp ? -
@martial123 said in How to create multi windows Qt project:
How you do that ?
For instance with signals and slots - emit a signal when the first window is closed and open the second in your slot.
-
@martial123 said in How to create multi windows Qt project:
in main.cpp ?
The first window is created in main as usual. The second can be created in the first window as I wrote before.