qt QWidget click

Viewed 48002

I have my own class based in QWidget. I put this widget in QMainWindow and I need catch mouse click on this widget.

I tried:

connect(my_widget, SIGNAL(clicked()), this, SLOT(exit(0)));

But nothing is happening. How can I do it?

2 Answers
Related