Is this intentional?
-
so I made a new qt desktop project and noticed that the qt editor generated this in the loadscreen.h file
Why are we definingUi::LoadScreen
and::LoadScreen
? Doesn't that defeat the purpose of the namespace? Is it autogenerating a class that I don't have the defination of? -
Hi and welcome to devnet,
That's because you asked for a new Designer based widget. This means that you also have a
loadscreen.ui
file that will be processed by theuic
application. It will generate C++ code with a class stored in the Ui namespace based on the content of the.ui
file.For more information see:
-
@digital_light said in Is this intentional?:
Why are we defining
Ui::LoadScreen
and::LoadScreen
? Doesn't that defeat the purpose of the namespace?They are 2 separate classes.
::LoadScreen
is your "actual" class where you write your codeUi::LoadScreen
is a fully auto-generated class that's embedded inside::LoadScreen
.