10-11-2012 09:16 PM
hi,
Ive been trying to trigger an action for when certain tabs are launched so for this i though "hey the activeTabChanged signal is perfect!" but for some reason (i am maybe implementing it in the wrong way) it never triggers the signal.
This is how I implement it:
QObject::connect(tabbedPane, SIGNAL(activeTabChanged(Tab*)),this, SLOT(sectionTriggered(Tab*)));
void App:: sectionTriggered(bb::cascades::Tab* activeTab) {
activeListURL = activeTab->objectName();
getList();
}
Am i missing something? I debug and put a break point in the slot but it never reaches the point...
Solved! Go to Solution.
10-12-2012 12:23 AM
Did you remember to prototype the slot in your header .hpp or .h file?
Add this:
public slots: void sectionTriggered(bb::cascades::Tab* activeTab);
Recompile and post findings.
Good luck!
10-12-2012 01:41 PM
I hope my error was as simple as that, i do have declared the slot in the app.hpp. Still the slot is never reached...
10-12-2012 01:56 PM
Ok, i just found the solution just had to connect the signal like this:
QObject::connect(tabbedPane, SIGNAL(activeTabChanged(bb::cascades::Tab*)), this, SLOT(sectionTriggered(bb::cascades::Tab*)));
(including the "bb::cascades::" part) even though the qde outlines it as an error...