Why does the slot function not respond when the Qt child widget sends Update signal?
-
#include <QPushButton> test::test(QWidget *parent) : QWidget(parent) { ui.setupUi(this); QPushButton* pButton = new QPushButton; pButton->setParent(this); // QObject::connect(pButton, SIGNAL(update), this,SLOT(onSubWidgetUpdade)); } test::~test() { } void test::onSubWidgetUpdade() { int J = 0; }
-
#include <QPushButton> test::test(QWidget *parent) : QWidget(parent) { ui.setupUi(this); QPushButton* pButton = new QPushButton; pButton->setParent(this); // QObject::connect(pButton, SIGNAL(update), this,SLOT(onSubWidgetUpdade)); } test::~test() { } void test::onSubWidgetUpdade() { int J = 0; }