以下是小弟的設定及問題。
我設定兩個*.h檔,其中一個是做mainwindows設定,另一個是做某功能設定。
在mainwindows.cpp中
MainWindows :: MainWindows()
{
Makerfid rfid;
IDCardLabel = new QLabel(tr("Student ID_Card : "));
IDCardNumberLabel = new QLabel(tr("Default!"));
LoadPushButton = new QPushButton(tr("Load"));
buttonBox = new QDialogButtonBox;
buttonBox->addButton(LoadPushButton, QDialogButtonBox::ActionRole);
connect(LoadPushButton, SIGNAL(clicked()), &rfid, SLOT(Test()));
在此connect中設定當mainwindows的LoadPushButton有被click則會呼叫rfid的Test();
但當我編譯好之後,按下LoadPushButton卻沒有任何反應?想請問各位前輩能否幫我解答這個問題。
是否還有什麼地方沒有設定到?或缺少設定。
....
}