multiple windows (user interfaces)
Hello,
how to have more than one UI and change between them with UI2.Show(); for example.
Thank you
4 replies
Hi,
sorry I do not 100% understand the problem.
Let me try to re formulate:
- You want an application with several top level windows.
- you want to design those windows with designer
- All this si done during developement so no need to load *.ui files at runtime.
Is this correct? If yes, do it the same way as with one designer created file :-) Replace QWidget from Lukas example with your class names, that is it.
Thank you, this was a correct interpretation.
At first I just wanted to know how to add a new UI file to my project, it was File>New>Qt>Qt Designer Form>templates\forms>Main Window.
But do I really need “new QWidget” if the Widget as is exists in the file which I have already added to my pro file ?
And how to call the form (by its filename? )?, btw I named it mainwindow2.ui
Thank you for help, still learning.
You must log in to post a reply. Not a member yet? Register here!



