As per the Qt docs, We can connect signals to slots in a many-to-many fashion.
But lets say I have a member function void foo() and NOT declared in slots declaration section, and its just a member function. Then Can i connect the buton click SIGNAL to foo() member function ? Like ...
connect(myPushButton, SIGNAL(clicked()),this, SLOT(foo()));
connect(myPushButton, SIGNAL(clicked()),this, SLOT(foo()));
To copy to clipboard, switch view to plain text mode
When I've declared void foo() in private slots: section, its getting called properly. But when I'm declaring void foo() in private: section, its not getting called.
So, Is there any way we connect a signal to a member function without declaring it as a slot member function ?
Thank you.
Bookmarks