Pls find the flow of signal from homeWidget to slot in cworker:
In chomewidget.cpp:
connect(m_pbScan, SIGNAL(clicked()), this, SIGNAL(scanBtnClicked())); // this connect is in constructor of homeWidget.cpp
connect(m_pbScan, SIGNAL(clicked()), this, SIGNAL(scanBtnClicked())); // this connect is in constructor of homeWidget.cpp
To copy to clipboard, switch view to plain text mode
In centralWidget.cpp:
homeWidget = new CHomePage();
connect(homeWidget, SIGNAL(scanBtnClicked()), this, SIGNAL(scanBtnClicked())); // again in constructor
// used similar name for signal in centralWidget.cpp again
homeWidget = new CHomePage();
connect(homeWidget, SIGNAL(scanBtnClicked()), this, SIGNAL(scanBtnClicked())); // again in constructor
// used similar name for signal in centralWidget.cpp again
To copy to clipboard, switch view to plain text mode
In cmainwindow.cpp
centralWidget = new CCentralWidget(); // QStackedWidget
connect(centralWidget, SIGNAL(scanBtnClicked()), worker, SLOT(onScanBtnClick()));// in constructor
centralWidget = new CCentralWidget(); // QStackedWidget
connect(centralWidget, SIGNAL(scanBtnClicked()), worker, SLOT(onScanBtnClick()));// in constructor
To copy to clipboard, switch view to plain text mode
In cworker.h
public slots:
void onScanBtnClick();
public slots:
void onScanBtnClick();
To copy to clipboard, switch view to plain text mode
In cworker.cpp
void CWorker::onScanBtnClick()
{
qDebug("Scan Button Clicked from UI");
}
void CWorker::onScanBtnClick()
{
qDebug("Scan Button Clicked from UI");
}
To copy to clipboard, switch view to plain text mode
Thank you.
Bookmarks