Ui Namespace
General and Desktop
3
Posts
2
Posters
1.5k
Views
1
Watching
-
wrote on 20 Jul 2014, 23:36 last edited by
Are these two namespaces the same? The Ui namespace in Mainwindow.h and Ui_Mainwindow.h.
If not how does the compiler know that MainWindow in the namespace Ui in MainWindow.h is actually a forward declaration of Ui::MainWindow in Ui_Mainwindow.h
In MainWindow.h
@
namespace Ui {
class MainWindow; //Forward declaration of MainWindow from ui_MainWindow.h
}@In ui_MainWindow.h
@
namespace Ui {
class MainWindow: public Ui_MainWindow {};
} // namespace Ui
@ -
wrote on 21 Jul 2014, 05:45 last edited by
Yes, Ui namespace is the same in both files if the files are in the same project.
-
wrote on 21 Jul 2014, 05:47 last edited by
Okay thank you. I know how namespaces work. Just got a bit confused since this is the first time I have used Designer to create a new Form for me.
1/3