Garmaine Staff asked 2 years ago

I'm working on a Qt project. I have a inheritance class which is a Qt Gui class and I want to recover the ui object in the inherited class.

Here is my code :

inheritance class

namespace Ui {
class AddEditUser;
}

class AddEditUser : public QWidget
{
    Q_OBJECT

public:
    explicit AddEditUser(QWidget *parent = nullptr);
    virtual ~AddEditUser() = 0;

protected:
    Ui::AddEditUser *ui;
}

inherited class

#include "addedituser.h"

class AddUser : public AddEditUser
{
public:
    AddUser();

private slots:
    void on_validationButton_clicked();
};

call in inherited class

AddUser::AddUser()
{
    connect(ui->validateButton, SIGNAL(released()), this, SLOT(on_validationButton_clicked()));
}

I have this error (sorry, it's in french)

error