Slots do not want to work in the loaded form through QUiLoader. Here is the base class constructor:
LoaderWidget::LoaderWidget(const QString &nwgt, QWidget * p): QWidget(p) { std::shared_ptr<QUiLoader> pUIl (new QUiLoader); QFile ui("/home/userc/authAstra/widgets/" + nwgt + ".ui"); if(ui.open(QIODevice::ReadOnly)) m_widget = pUIl.get()->load(&ui); if(ui.isOpen()) ui.close(); } Here is a child
AuthWidget::AuthWidget(QWidget * parent) :LoaderWidget("auth", parent), local_auth_handle(NULL) { ui_loginBtn = m_widget->findChild<QPushButton*>("btnLogIn"); connect(ui_loginBtn, SIGNAL(clicked(bool)), SLOT(slot_authenticate_system())); } The slot is declared as public slots, connect does not swear, it just does not work at all. Although the code
connect(ui_loginBtn, SIGNAL(clicked(bool)), qApp, SLOT(quit())); performed. Macro Q_OBJECT is. I do not understand why.
connect(ui_loginBtn, SIGNAL(clicked(bool)), SLOT(slot_authenticate_system()));should not compile. - Ariox 7:42 pm