I'm starting to use Qt Designer.
I am trying to create a game, and the first task that I want to do is to create a window where you have to input the name of the map that you want to load. If the map exists, I then switch to the main game window, and if the name of the map doesn't exist, I want to display a popup window that tells the user that the name of the map they wrote is not valid. 
I'm a bit confused with the part of showing the "not valid" pop-up window.
I realized that I have two options:

Creating 2 separated .ui files, and with the help of the .show() and .hide() commands show the correspoding window if the user input is invalid. 
The other option that I'm thinking of creating both windows in the same .ui file, which seems to be a better option, but I don't really know how to work with windows that come from the same file. Should I create a separate class for each of the windows that come from the Qt Designer file? If not, how can I access both windows from the same class?
Your second option seems impossible, it would be great to share the .ui since in my years that I have worked with Qt Designer I have not been able to implement what you point out.
An .ui is an XML file that describes the elements and their properties that will be used to create a class that is used to fill a particular widget. So considering the above, your second option is impossible.
This concludes that the only viable option is its first method.
How does Qt Designer work in terms of creating more than 1 dialog per file?