Windows interact
-
Hi everybody,
I'm using Qt Designer to design all the windows of my application. Then, i translate them into .py files. Every tuto i saw give a good explanation about this. However, no tuto show clearly how can i do to make interact each windows.
To be clear :- first window made with Qt designer
- in a new file i create a class "mainwindows" wich inherits from first window Ui
- second window made with Qt designer
- in a fourth file, i create a class "second windows" wich inherits from second window
A Qpushbutton in the first window allows the application to hide the first window and launch the second window. What i can't understand is how closing the second window, i can reshow the first window (not a new instance but the hiden window).
It's really obscure and though my research i never found any clear description.
Could you help me please. It has been so long i'ma looking for the solution.
Best regards.
Fanou
PS : i'm a new user of Python, and for the moment, i find VBA more flexible and easier to understand. I'm close to abandon Python due to his complexity, unless someone explain me how to do this so little and simply thing.
-
Hi everybody,
I'm using Qt Designer to design all the windows of my application. Then, i translate them into .py files. Every tuto i saw give a good explanation about this. However, no tuto show clearly how can i do to make interact each windows.
To be clear :- first window made with Qt designer
- in a new file i create a class "mainwindows" wich inherits from first window Ui
- second window made with Qt designer
- in a fourth file, i create a class "second windows" wich inherits from second window
A Qpushbutton in the first window allows the application to hide the first window and launch the second window. What i can't understand is how closing the second window, i can reshow the first window (not a new instance but the hiden window).
It's really obscure and though my research i never found any clear description.
Could you help me please. It has been so long i'ma looking for the solution.
Best regards.
Fanou
PS : i'm a new user of Python, and for the moment, i find VBA more flexible and easier to understand. I'm close to abandon Python due to his complexity, unless someone explain me how to do this so little and simply thing.
@Fanou
There are many ways to do this.If you really want second window to be able to re-show first window, first could pass its
self
as a parameter to second's constructor for second to later call.show()
on.Many times when this question is asked you are really looking to use
QStackedWidget
to manage only showing one window at a time.