The class created when creating a form in Qt. Why can't I define a function inside a class? With such a record, I get the error invalid use of incomplete type 'class Ui::EnterWindow'
namespace Ui { class EnterWindow; } class EnterWindow : public QDialog { Q_OBJECT public: explicit EnterWindow(QWidget *parent = 0); ~EnterWindow(); QString getLogin() { return ui->label->text(); } private: Ui::EnterWindow *ui; }; If I write the functions in this form
QString getLogin(); And in the .cpp file I will determine, everything will be fine.