Try connecting manually in constructor:
#include <QDebug>
...
Primary::Primary(QWidget *parent
) : ui(new Ui::Primary)
{
ui->setupUi(this);
bool status = connect(ui->addBtn, SIGNAL(clicked()), this, SLOT(on_addBtn_clicked()));
qDebug() << "connection status:" <<status;
}
#include <QDebug>
...
Primary::Primary(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::Primary)
{
ui->setupUi(this);
bool status = connect(ui->addBtn, SIGNAL(clicked()), this, SLOT(on_addBtn_clicked()));
qDebug() << "connection status:" <<status;
}
To copy to clipboard, switch view to plain text mode
I think you don't need QStrings in lines 11-13, you have local strings in slot with the same name. Maybe it's just a typo ?
Bookmarks