oplease, help me to solve this probleme. I don't know the proble but if I put QObject
in file.h he generate error !
file.h
#include <QMainWindow>
class choice_page_2 : public QMainWindow
{
public:
choice_page_2();
QWidget* M_Widget = new QWidget();
public slots:
void On_clicked_delCare();
};
#endif // CHOICE_PAGE_2_H
fill.cpp
choice_page_2::choice_page_2()
{QPushButton *ManageBtn = new QPushButton(tr("Gérer une voiture"));
QMenu *menu = new QMenu(this);
QAction* AddCare = new QAction(tr("Ajouter une voiture"), this);
QAction* DelCare = new QAction(tr("Supprimer une voiture"), this);
QObject::connect( DelCare, SIGNAL(triggered()),this, SLOT(On_clicked_delCare()));
}
I get this error: **QObject::connect: No such slot QMainWindow::On_clicked_delCare()