How to change between QMainWindows???
Hello,
I have two forms (UI's) and main.cpp load form1.
Now in form1.cpp I have a botton to load form2 and close form1.
classForm2 *form2 = new classForm2();
form2->show();
form1->close();
Well, If I execute this code, it works fine, but there is a small problem, after close form1 class, appear green background screen and later, form2 is loaded.
My question is, is it possible to avoid this behaviour???
Best regards.
Re: How to change between QMainWindows???
Are you really talking of two QMainWindows? Then closing the first and showing the second is no good idea, because there should be only one QMainWindow in your application. If you just want to have other widgets on the screen you might should a look at QStackedWidget (e.g.).
Re: How to change between QMainWindows???
Quote:
Originally Posted by
Lykurg
Then closing the first and showing the second is no good idea, because there should be only one QMainWindow in your application.
That's not true, you can have as many of them as you want - it's a normal window like any other.
But this doesn't change the fact we probably don't know what green screen is the author of this thread talking about...
Re: How to change between QMainWindows???
Thanks a lot.
I am going to read Qt documentation about this class.
Best regards