I have a class MyClass with:
- private: pushButton *button; void connectSignalAndSlot(); - private slot: void buttonAction();
You must have MyClass inherit from QObject AND add Q_OBJECT macro in your MyClass definition (header file) to have slots/signals work.
MyClass
QObject
Q_OBJECT
class MyClass : public QObject { Q_OBJECT public: .... };