Holla, in the Qt 5 project auto-generated files from QtCreator. There is a Ui namespace declaration in two separate headers, and both are included in the same cpp file.
namespace Ui {
class MainWindow;
}
namespace Ui {
class MainWindow: public Ui_MainWindow {};
int x;
}
#include "ui_mainwindow.h"
#include "mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
I wonder what happens with the namespace? is it combined and why is this not considered an override of the MainWindow class? Thanks in advance.
Thanks for your answers, and I found an article on headings, including
source
share