What are differences between:
namespace Ui
{
class T;
}
class T
{
//some content
};
and
namespace Ui
{
class T
{
//some content
};
}
I use Qt Creator and the first construction is used in the default code which is generated for Qt Gui Application. In the example project I have two classes: class MyDialog : public QDialog and class MainWindow : public QMainWindow Each of them contains in the private section a pointer to the class:
class T: public Q
{
private:
Ui::T *pointer;
}
What is purpose of such contruction ? When MainWindow class contains also a pointer to the MyDialog class then that pointer can't contain Ui:: qualifier:
private:
Ui::MainWindow *ui;
MyDialog *mDialog;
Why ?